I’m using ajax to get a json string from the server then using eval to turn it into an object. when I iterate through thejson data I only get the key. How do I get the value of the key. This is what I have:
var jsonobj = eval('(' + xmlhttp.responseText + ')');
for (i in jsonobj){
alert(i);
}
Which alerts the keys. How do I get the value of the keys?
Use Sub-script notation:
jsonobj[i]