I am trying to make a store that reads "cart-items" out of the following JSON:
Code:
{
"request-status": "success",
"session-token": "8259984ckur9678d82grfiujn7",
"response-data": {
"cart": {
"cart-items": [
{ ... },
{ ... }
...
The store I have looks like this:
Code:
var theStore = Ext.create('Ext.data.Store', {
model:'CartItems',
autoLoad: true,
proxy: {
type: 'ajax',
url: 'data/cart.json',
reader: {
type: 'json',
root: 'response-data',
record: 'cart-items'
}
},
Now I am pretty sure I am getting no data back because there is the 'cart' level JSON between the 'response-data' and the 'cart-items'. I can't rearrange the JSON easily, is there a way to do this or do I need to look into a custom reader for this?
Thanks,
Rambo.