Results 1 to 2 of 2

Thread: Mapping root/record help & metadata

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    81
    Answers
    3
    Vote Rating
    0
      0  

    Default Answered: Mapping root/record help & metadata

    Say for a second i have the following data structure:
    Code:
    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)

  2. 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.

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,062
    Answers
    3976
    Vote Rating
    1391
      0  

    Default

    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 @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •