PDA

View Full Version : Mapping root/record help & metadata



mice-pace
24 Sep 2012, 6:47 PM
Say for a second i have the following data structure:

Results:[
{
Tasks:[{1},{2},{3},{4}],
SomeKey: X
},
{
Tasks:[{5},{6},{7},{8}],
SomeKey: Y
}
]

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'?

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)

mitchellsimoens
26 Sep 2012, 7:28 AM
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.