1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    2
    Answers
    1
    Vote Rating
    0
    jamesnpope is on a distinguished road

      0  

    Question Answered: jsonreader: how to get the totalProperty from a nested JSon value?

    Answered: jsonreader: how to get the totalProperty from a nested JSon value?


    Hi,

    How can I define the totalProperty config value of my Jsonreader to use a value from my JSon response that is nested a few levels down? If you look at the JSON response below, I need the totalProperty value to be taken from queries/request/totalResults...

    JSON response:
    {
    "queries": {
    "request": [{
    "totalResults": "87200"
    }]
    },
    "items": [
    {"title": "The title"},
    {"title": "The title"}
    ]
    }

    Thanks in advance,

    James

  2. Found it...

    totalProperty: 'queries.request[0].totalResults'

  3. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    2
    Answers
    1
    Vote Rating
    0
    jamesnpope is on a distinguished road

      0  

    Red face [SOLVED]

    [SOLVED]


    Found it...

    totalProperty: 'queries.request[0].totalResults'

  4. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,785
    Answers
    451
    Vote Rating
    597
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    That works. For more complicated stuff a function would work too.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."