can't loop out data from json array? -



can't loop out data from json array? -

i can't loop info out response array.

$.post(myurl , function(response){ (var = 0; < response.result.length; i++) { alert(response.result[i]); } },"json");

result of returned json array :

{"result":["data one","data two","data three"]}

did u seek using json.parse obtain info in json object format? always utilize jslint see if json proper, before using json.parse.

edit : in head tag add together json2.js. go here , download it. whenever u have json string 1 in question. utilize json.parse(somejsonstring);

var t = '{"result":["data one","data two","data three"]}' ; //response text var p = json.parse(t); //p.result[0] give u "data one"

json

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -