actionscript 3 - Print data from json response to AS3 label -


this json response i'm getting api, used.

 trace(loader.data); 

 httpstatushandler:200  {"status":"success","data":    [{"cab_id":"101","rating_up":"4","rating_down":"4"}],"errors":""}  

i need decode , print in as3 .can show mew how so.
tried this,


var mydata:object = json.decode(loader.data);  trace(mydata[1]); trace(mydata->rating_up); trace(mydata.tostring());   none working!!! help?     

why don't try like

trace(mydata.data[0].cab_id); trace(mydata.data[0].rating_up); trace(mydata.data[0].rating_down); 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -