I'm trying to access data in my variable object:
foo = {
tweet1 : [{
user: {
profile_image_url : "assets/avatar.png",
name : "@Hodor"
},
text : "Hodor Hodor Hodor Hodor Hodor Hodor Hodor..... Hodor"
}],
tweet2 : [{
user: {
profile_image_url : "assets/avatar.png",
name : "@johnsnow"
},
text : "Someone once said that I know nothing..."
}],
tweet3 : [{
user: {
profile_image_url : "assets/avatar.png",
name : "@drwho"
},
text : "Fantastic!"
}]
};
And I have my loop set up which gives me 3 objects:
for (var i in foo) {
console.log( foo[ i ] );
}
However I am unsure how to access the data further and grab the text and user keys for each object. Thoughts?