1. #11
    Sencha User
    Join Date
    Mar 2011
    Posts
    3
    Vote Rating
    0
    kibriame is on a distinguished road

      0  

    Default


    I want to load one store with data from 3 roots. How can i read all roots data.
    here is the query result :
    ({
    "total":"13",
    "veh_cond_data":[{"veh_cond":"New","counter":"8"},{"veh_cond":"Recondition","counter":"3"},{"veh_cond":"Used","counter":"2"}],
    "color_data":[{"color":"red","counter":"5"},{"color":"silver","counter":"8"}],
    "data":[{"id":"206","user":null,"pro_name":"TOYOTA-COROLLA-X-2006_CB9162900368683040","veh_cond":"Used"},
    {"id":"198","user":null,"pro_name":"TOYOTA-ALLION--2011_CB9162900368683040","veh_cond":"New"}]
    })
    I have no problem to retirve data from data array and total, but i face problem in this two array,
    "veh_cond_data":[{"veh_cond":"New","counter":"8"},{"veh_cond":"Recondition","counter":"3"},{"veh_cond":"Used","counter":"2"}],
    "color_data":[{"color":"red","counter":"5"},{"silver":"8","counter":"3"}],

    How do I access data in "color_data" and "veh_cond_data" array in js file?
    Please give me some advice

  2. #12
    Sencha User
    Join Date
    Mar 2012
    Location
    hyderabad
    Posts
    1
    Vote Rating
    0
    sanjeevreddyk is on a distinguished road

      0  

    Default This will be possible if you are using EXT 4.x

    This will be possible if you are using EXT 4.x


    By using this proxy config you can read as many root elements as you want..


    reader: { type: 'json', root: function(o){ var out = []; return out.concat(o.root1, o.root2, o.root3); } }