0
votes

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

Thanks

1
Why post a 1 line question? At least post the json you're trying to parse, what your store definition is.Evan Trimboli

1 Answers

1
votes

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'
        }
    }