in my app when the user clicks a button, it hits an url and i use to get a return data in json format as follows
{
"Status":
{
"image":
[
{
"Large" : "http://XXXXXXXXXXXXXXXXXX.com/images/original/1316145577.jpg",
"Small" : "http://XXXXXXXXXXXXXXXXXX.com/images/thumb70/1316145577.jpg"
},
{ "Large" : "http://XXXXXXXXXXXXXXXXXX.com/images/original/1316146270.jpg",
"Small" : "http://XXXXXXXXXXXXXXXXXX.com/images/thumb70/1316146270.jpg"
},
{ "Large" : "http://XXXXXXXXXXXXXXXXXX.com/images/original/1316146473.jpg",
"Small" : "http://XXXXXXXXXXXXXXXXXX.com/images/thumb70/1316146473.jpg"
},
{ "Large" : "http://XXXXXXXXXXXXXXXXXX.com/images/original/1316147003.jpg",
"Small" : "http://XXXXXXXXXXXXXXXXXX.com/images/thumb70/1316147003.jpg"
},
{ "Large" : "http://XXXXXXXXXXXXXXXXXX.com/images/original/1316581422.jpg",
"Small" : "http://XXXXXXXXXXXXXXXXXX.com/images/thumb70/1316581422.jpg"
},
{ "Large" : "http://XXXXXXXXXXXXXXXXXX.com/images/original/1316694587.jpg",
"Small" : "http://XXXXXXXXXXXXXXXXXX.com/images/thumb70/1316694587.jpg"
}
]
}
}
i want to do json parsing and store the URLs named under Large to be stored in an Array and URLs named under Small to be stored in another array. I want this to be done using javascript.
For example in my app in another url my json data is to be as follows
{"Status":[{ "Id": "46", "Username": "guru" }]}
For this i use to get the data as
var data = JSON.parse(my_JSON_object);
var id = data.Status[0].Id;
var name = data.Status[0].Username;
But how to parse for the json array mentioned first.
How to do this, pls help me friends
i got the answer by this way