In the following JSON example, how can I access item of list
when I do not know the id of those elements in javascript.
{
"list":{
"93817":{
"item_id":"93817"
"url":"http://url.com",
"title":"Page Title"
},
"935812":{
"item_id":"935812",
"url":"http://google.com",
"title":"Google"
}
}
}
var jsonObject = JSON.parse(req.responseText);
var item = jsonObject.list[0] // This does not work
PS: I can not change the format of the JSON since it is created by a third part.