How to process JSON output in AJAX?
Reiterating on the same question asked yday(Above link),I seem to have more clarity now.
I get JSON output in ‘data’
var query = getDomainURL() + “/ProgramCalendar/GetJSONData”;
$.post(query, null, function (data) {...}
Now i Need to loop through the nodes and Identify ‘Key’ based on the names, and do some action for the ‘val’
$.each(data, function(key, val) {
…
}
Can it be done using something similar with $.each, can you let me know the exact syntax?
Thanks,
Adarsh
If the server returns a JSON array you could use
$.each: