Iv read a lot of search results regarding how to deal with a JSON array that is returned from an Ajax function, but none seem to fit my problem.
Explain: I am effectively searching through a database in a tree like structure to return all of the child elements of a given element. There may be from 1 to many hundreds of results. All of this grunt work is done in PHP, which then returns a JSON array containing the results, however, I cant seem to work out how to iterate over the result, which looks like this:
{
"Kaz1Kid43343757245": {
"kaz1KidKid24572649":[],
"kaz1KidKid24572649Back":[]
},
"Kaz1Kid43343757245Back":[]
}
Note that each of the items needs to be returned as an individual ID, but if I try
$.each(obj, function(key, val)
{
//doing stuff with each item
});
I only get two of the results (Kaz1Kid43343757245 and Kaz1Kid43343757245Back) in the keys while the val's show nothing at all.
What am I doing wrong?
Cheers
MVK