I have a JSON string which I then convert into JSON Object by using jQuery. The string in question given below:
var json = [
{
"1240": [
"Order1",
"user1"
]
}
]
Here key 1240 is Dynamic and I can't do something like json[0]["1240"]
When I do something like:
for(var f in json )
{
alert(f);
}
Then it returns "0"
How do I fetch 1240 here?
json[0]
. If you want to reach "1024", you needfor(var i in json[0])
– Passerby Sep 26 '13 at 8:34