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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,339
    Answers
    3887
    Vote Rating
    1297
      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
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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 in print!

    When posting code, please use BBCode's CODE tags.

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
  •