Sencha Touch – Ajax JSON with multiple roots

Read Time:26 Second

I have JSON result that contains multiple roots.
Most example JSONReader source codes are dealing with one root.

According to cnelissen from Sencha Forum, using below code will make it working:

var store1 = new{
url: '/path/to/json-data.php',
method: 'POST',
autoLoad: true,
reader: new{
root: 'root1',
fields: ['field1', 'field2', 'field3']
listeners: {
'load': function() {

var store2 = new{
reader: new{
root: 'root2',
fields: ['field1', 'field2', 'field3']


Thx, cnelissen.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.