0

is it possible to parse json response without root object in extjs4.1.If yes can anybody tell how to do

Thanks

mohan
  • 13,035
  • 29
  • 108
  • 178

1 Answers1

1

For this, you need to not define the root (reader property of proxy). For example, when you have root and total property, the proxy definition looks like the following

proxy: {
        type: "ajax",
        url: "users.json",  
        reader: {
            type    : 'json',
            root    : 'result.account',
            totalProperty: "result.totalRecords"
        }
    }

Without the root (that means there is no totalProperty as well), the definition will look like this

proxy: {
        type: "ajax",
        url: "users.json",  
        reader: {
            type    : 'json'
        }
    }
Jardalu
  • 231
  • 3
  • 9