I have a JSON array like this:
{
"forum":[
{
"id":"1",
"created":"2010-03-19 ",
"updated":"2010-03-19 ","user_id":"1",
"vanity":"gamers",
"displayname":"gamers",
"private":"0",
"description":"All things gaming",
"count_followers":"62",
"count_members":"0",
"count_messages":"5",
"count_badges":"0",
"top_badges":"",
"category_id":"5",
"logo":"gamers.jpeg",
"theme_id":"1"
}
]
}
I want to use jQuery .getJSON
to be able to return the values of each of the array values, but I'm not sure as to how to get access to them.
So far I have this jQuery code:
$.get('forums.php', function(json, textStatus) {
//optional stuff to do after success
alert(textStatus);
alert(json);
});
How can I do this with jQuery?
See Question&Answers more detail:os