PDA

View Full Version : Retrieving Extra Data From Server Response Beyond "root" config of proxy



rnxfod
24 Jul 2013, 2:28 AM
How can i get extra data from the json response of a server beyond what i specify as the "root" of the proxy config. for instance in the json server response below

itemlist is the value of the root b'cos that's where the records I need are
but there are some additional params like status, operation_status outside the itemlist which is sort of like my meta-data server response - depending on their values i'll treat records in itemlist differently. How do i get access to these since their not included in the itemlist



{ "status": "success", "operation_status": "OPERATION_SUCCESSFUL" },{"itemlist": [{ "phone":"08564866555", "name":"SMITH JOHN", "sex":"M", "company":"BUCKY", "addr":"H16, COMM. 17,TEM." }]}

julio.batista
24 Jul 2013, 3:32 AM
Take a look at
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.data.reader.Json-property-rawData (http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.data.reader.Json-property-rawData)

rnxfod
25 Jul 2013, 2:08 AM
Thanks a bunch. reference was great help. Had seen it before but didn't pay much attention to it, guess it was right under my nose.