View Full Version : How do I retrieve JSON for use in a store when I don't know the field names?

27 Feb 2014, 4:30 PM
My JSON is return in this format:

{"svsadfsa":{"name":"Noah Mckinney","email":"eget@etnuncQuisque.edu"},"asdfasdf":{"name":"Patrick Haney","email":"tristique.pellentesque@pretiumaliquet.com"}}

Where the field names are the object's ID, I don't know what they will be or how many there are.

27 Feb 2014, 5:39 PM
Any chance of a root above the unknown field names?

You might have to override Reader :: getResponseData to gather the incoming data and part it yourself

27 Feb 2014, 9:28 PM
you can also use the column index for this in your model instead of a name.



field definition:
{ name : 'custom', mapping : 0 }