Why is this object property undefined?
Consider the code below. The first console.log correctly logs the image, and you can see its properties in the image below. However, when I try logging one if its properties to the console, I get undefined ! console.log(that.data[0].cards); //works -- see image below console.log(that.data[0].cards.E); //undefined console.log(that.data[0].cards['E']); //undefined console.log(that.data[0].cards.hasOwnProperty('E')); //false var test = JSON.stringify(that.data[0]); console.log(test); // {} for( var key in that.data[0].cards ) { console.log('hello????') //doesn't appear in the console } console