How do I access the name:values of each Object stored within the randomImage.images Array?
I tried using a for in loop (see the randomImage.imagePicker Method for reference) but the output I get is:
0[object Object]
1[object Object]
2[object Object]
3[object Object]
(function() {
var randomImage = {
images : [
{ 'image 1' : 'http://placehold.it/100x100'},
{ 'image 2' : 'http://placehold.it/200x200'},
{ 'image 3' : 'http://placehold.it/300x300'},
{ 'image 4' : 'http://placehold.it/400x400'}
],//images Array
imagePicker : function () {
for (var k in this.images ) {
console.log(k+this.images[k]);
}
}//imagePicker Method
}//randomImage Object
randomImage.imagePicker()
})()
images: [ "http://...", "http://...", ...]