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,556
    Answers
    3931
    Vote Rating
    1272
      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! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    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
  •