I have a problem regarding return data using JSON. How do i get the data returned from my php if i use JSON? Just like when you use responseXML, the response is XML, so in the callback you can go:
function callbackFunc(){
var str = responseXML.getElementsByTagName('tagOne')[0].firstChild.nodeValue;
..
}
If I am using JSON how do i access the return data?
Help! Thanks!
Look at the
JSONobject in modern browsers.You won’t need to mess about with entity tags, you can simply
JSON.parse(responseData)and the structure will be available in an Object.