javascript - Parse complex JSON in Sencha Touch -


I have asked Sekachi on the forum, but I do not have a great response (ok, nobody really is in fact). I wonder if anyone can help I want to make a list of items from an JSON response obtained from PHP scripts. Here is an example of a JSON obtained from PSP:

  {"friend": [{"friend": {"id": "4", "firstly": "Chris" "surname ":" Major "," Verboznam ":" Chris Major "," Phone Number ":" 07931655247 "," Longitude ":" - 0.41090 9 "," Latitude ":" 52.999245 "," Email ":" Head @ Linux MPS "" "" "" "" "" "" "" "" "Forename": "Marta", "Surname": "UrbanWiki", "VerbosName": "Marta Arrenavogic", "Phone Number": "07716021468", "Longitude": "- 0.0338518", "Latitude": "52.9773876" "Email": "urb.marta@googlemail.com", "Last Refresh ": blank," joining " : "12 94836801"}, "Network": Zero, "Approved": "1"}}}   

I would like to know how I can parse it in Datastore and then Sena There is an example of using standard JSON responses for a ListView, it does not look like a nested example ...

Any help received thanks

Ben,

What would you like to do Areas are declared with the fields with your friends shops fields that you want (

When the Ajax call to a remote with remote call, which will now go back to the raw data.

At that point you will be a 'friend' object. Then you can loop through each "friend" and instead create new things instead of adding "friend":

var buddy = {id: '2', nickname: 'whatever' , Email: 'whatever @ blah.com'}

Create an array of those new friend structures, and pass them in those stores it will level or simplify your complex Jason structure.

Hope that helps, and if you need them I can provide more information.

Comments