I have a JSON data as shown below, I want to traverse into it with loop, but data.length is returning 1 while it should return 2.
Please help me out how can I traverse into data with loop without modifying it
var data=[{
"468040": {
"Author": "William von Hagen",
"Title": "Ubuntu Linux Bible"
},
"541115": {
"Author": "Lohith G.N.",
"Title": "Windows Phone 7.5 Application Development with F#"
}
}]
alert(data.length); //returning 1 instead of 2

Priyaranjan K SPosted Oct 1, 2015, 7:17 AM
Thanks,
Priyan
Please mark the suggestions as answer if you found it useful.
Priyaranjan K SPosted Oct 1, 2015, 7:10 AM
If so I have worked out a solution .
Thanks,
Priyan
Ashish VishwakarmaPosted Oct 1, 2015, 6:36 AM
Priyaranjan K SPosted Oct 1, 2015, 6:04 AM