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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -