This is the JSON
"album":[
{
"name":"DD Y Ponle Play",
"artist":"Jumbo",
"id":"2528039",
"url":"http:\/\/www.last.fm\/music\/Jumbo\/DD+Y+Ponle+Play",
"image":[
{
"#text":"http:\/\/images.amazon.com\/images\/P\/B00005LN6S.01._SCMZZZZZZZ_.jpg",
"size":"small"
},
{
"#text":"http:\/\/images.amazon.com\/images\/P\/B00005LN6S.01._SCMZZZZZZZ_.jpg",
"size":"medium"
},
{
"#text":"http:\/\/images.amazon.com\/images\/P\/B00005LN6S.01._SCMZZZZZZZ_.jpg",
"size":"large"
},
{
"#text":"http:\/\/images.amazon.com\/images\/P\/B00005LN6S.01._SCMZZZZZZZ_.jpg",
"size":"extralarge"
}
],
"streamable":"0",
"mbid":""
},
And here is my function
$.each(data.results.albummatches.album , function(){
$.each(this.image , function(){
$('.lightbox').append('<img src="'+this["#text"]+'" />');
});
});
basically it all works fine, excpet that I am getting the 4 different Image sizes from the image object. However I only want to grab 1 of the sizes.
For the life of me I am having no luck specifying an id such as this[2]["#text"] or vic versa.
what am i missing? any help would be much apreciated.