-
24 Sep 2012 6:47 PM #1
Answered: Mapping root/record help & metadata
Answered: Mapping root/record help & metadata
Say for a second i have the following data structure:
1,2,3,4,5,6,7,8 are the objects I am most interested in... (they meant to represent objects, not values, i just wanted to make this faster to read) originally i was just returning one Tasks object and using it as the root, but if i want to access tasks in multiple results do i use the record value, or do i just expand the root to 'Results.Tasks'?Code:Results:[ { Tasks:[{1},{2},{3},{4}], SomeKey: X }, { Tasks:[{5},{6},{7},{8}], SomeKey: Y } ]
Also, is it possible to bundle the SomeKey with each of the tasks? (So tasks 5 & 6 would have a SomeKey: Y while task 1 would have a SomeKey:X)
-
Best Answer Posted by mitchellsimoens
Each object within Results will be a record so the objects within Tasks will be within a single record. If you want each of the objects within Tasks to be a record you would have to combine them into one object.
-
26 Sep 2012 7:28 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
- Answers
- 3102
Each object within Results will be a record so the objects within Tasks will be within a single record. If you want each of the objects within Tasks to be a record you would have to combine them into one object.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote