I have a data store from json
Code:
//Data Composition Reaction
Ext.define('ReactionCompoModel', {
extend: 'Ext.data.Model',
fields: [{name:'leftR',type:'string'},{name:'rightR',type:'string'}]
});
var storeReactionCompo = Ext.create('Ext.data.JsonStore', {
model: 'ReactionCompoModel',
proxy: {
type: 'ajax',
url: '../php/datareactioncompo_v2.php',
extraParams: {idReaction:0},
reader: {type: 'json' }
}
});
i want to recover the data
Code:
storeReactionCompo.proxy.extraParams.idReaction= idReaction;
storeReactionCompo.load();
console.log(storeReactionCompo.getById(leftR));
the storeReactionCompo.load return :
[{"leftR":"substrat1 + substrat2","rightR":"Product1 +Product2"}]
storeReactionCompo.getById('leftR') give result : null
storeReactionCompo.get('leftR')); give storeReactionCompo.get is not a function
I don't anderstand ; How can i get the value substrat1 + substrat2 ?
Thank you