I am having the following issue trying to return a json object via ajax and attach it to a grid. It seems that the store is splitting my result up character by character.
Here is my example.
The json object.
Code:
{"cardno":"125652","lastused":"20/01/2017","lastamount":"25.06","reversals":"15"}
And my Store.
Code:
Ext.define('CardStore', { extend : 'Ext.data.Store',
alias : 'store.card',
fields: ["cardno", "lastused", "lastamount", "reversals"],
model: 'CardModel',
autoLoad: true,
proxy: {
type: 'ajax',
url: 'http://localhost:52096',
reader: {
type: 'json'
},
api: {
read: 'http://localhost:52096/card/CardDetails'
}
}
});
If I do a getStore in the inspector, load the store and get the data, I get a constructor for each letter.
Code:
store.data.first().data
gives me for instance. Please help me out.