C
Chris
I can't figure out how to handle multidimensional arrays with json
created with ajax/php e.g.
{"452":{"name":"chris","age":"21"},"798":{"name":"sam","qty":"22"}}
I use the following code for simple arrays but don't know how to
handle multidimensional arrays?
json_object = eval( "(" + xmlHttp.responseText + ")" );
document.getElementById('name').value= json_object["name"];
How do I get to json_object[key][name]?
Many thanks,
Chris
created with ajax/php e.g.
{"452":{"name":"chris","age":"21"},"798":{"name":"sam","qty":"22"}}
I use the following code for simple arrays but don't know how to
handle multidimensional arrays?
json_object = eval( "(" + xmlHttp.responseText + ")" );
document.getElementById('name').value= json_object["name"];
How do I get to json_object[key][name]?
Many thanks,
Chris