Unable to parse 2 dimensional json data using jquery sent from server using php -
$.post('ol_st_checker.php',function(d){ //this method going check ever online $.each(d.uinfo,function(index,value) { alert(index+'='+value); /*$.each(this,function(index, element) { alert(index+'='+element); });*/ }); },'json');},
the data sent browser using php json_encode looks shown below:
[{"uinfo":{"0":"1","status":"1","1":"1001","user_id":"1001","2":"2013-05-09 22:24:10","last_update":"2013-05-09 22:24:10"}}]
in alert box, i'm getting "undefined", when try display alert after post function, i'm getting above output.
try d
array. d[0].uinfo
object trying access.
$.post('ol_st_checker.php',function(d){ //this method going check ever online $.each(d[0].uinfo,function(index,value) { alert(index+'='+value); /*$.each(this,function(index, element) { alert(index+'='+element); });*/ }); },'json');},
Comments
Post a Comment