i am trying to create the facebook app. i want to use alert box. i dont know how to print the array values in alert..
"data": [
{
"name": "a",
"id": "585"
},
{
"name": "b",
"id": "6259"
},
{
"name": "c",
"id": "65209"
}
]
In this I want to print a,585..
How to get the values of array in alert box
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jignesh TrivediRank #16 · 50.3K reputationPosted Sep 19, 2013, 2:50 AM EDT
hi,
try...
var length = data.length;
for(i=0;i alert(data[i].id);
}
hope this will help you.
Manj N144 reputationPosted Sep 19, 2013, 2:53 AM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted Sep 19, 2013, 3:03 AM EDT
Is this solution work for you?
Manj N144 reputationPosted Jan 20, 2015, 4:46 PM EST