I know there is plenty of answers for this question on the net, but still I can't make it work.
After a callback on a JSON POST, I'm retrieving an Array of Object. On the console log of the browser, the array is like this :
[Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
where inside each object, there is stuff like :
id4blob: "1084"
so I assume the array could be like this (correct me if I'm wrong):
[{id4blob: "1084"},{id4blob: "2008"}, [...]]
The array is stored in a variable called stationsParse
I want to iterate over these values, I've found
Ext.iterate
So I did this :
Ext.iterate(stationsParse, function(key, value) {
console.log(key + value);
});
and then tried this (which seems yo be the same but in pure JS)
for (key in stationsParse) {
var value = stationsParse[key];
console.log(key + value);
}
But none is working, nothing is displayed in my console. Still, the function is well triggered, I can see it into Chrome console, but the for is ignored.
What Am I doing wrong ? Is this the correct way to iterate over an array of objects ?