In Extjs, I am trying to select a value accrued
from a variable Store
.
I tried:
var newStore = Store.data.items[0].data.accrued;
The above one is not working. I am getting error:
Uncaught TypeError: Cannot read property 'data' of undefined
Whenever I add items[0]
, it is making the variable undefined.
When I checked:
var newStore = Store.data.items.length;
output is: 0 //?
But I can see that there are items in Store
variable here as shown in the above image. Anyway, I just want to get the value of accrued
from the variable Store
.
I also checked:
var newStore = Store.data.items;
output is: [ ]
Store
@JinzhaoWu – Mr_Greenfor(x in Store.data.items) console.log(x);
to make sure the index is indeed0
? – techfoobarStore.data.items
is [ ] (I don't know how). – Mr_GreenExt.getStore('store_id').data.items[0].data.accrued
– cclerv