I’m currently getting 2 arrays from the following get statement.
$.getJSON("http://domain.com?callback=?", function(data){
$("#results").html(JSON.stringify(data));
I’m appending the results in a div with the id results.
All that is doing is just displaying the array. I need to pull certain objects from the array but I can’t do that because I am just printing the whole array. How do I get specific information from that array?
Here is some of the data that is being appended to the DIV.
{“me”:[{“player”:{“high_score”:110345,”rank”:2}}],”all”:[{“player”:{“@score := s.score”:110345,”avatar”:”http://profile.ak.fbcdn.net/hprofile-ak-snc6/195312_789328764_1121893995_q.jpg”,”guid”:”FE4EC535-B74F-4B68-8F4D-2CA0EBC28FAF”,”name”:”Charles Chase”,”rank”:1,”score”:110345}},
Thanks!
Provided that the following is your returned JSON data
You can use the following to grab the values from the JSON object
CODE
Note
meandallis returned as array. I hope it helps.