Parsing a JSON response Parsing a JSON response json json

Parsing a JSON response


You can't iterate over an object with for (at least not properly). It seems to me that you want to iterate over artists:

function displayNames(data) {    var artists = data.response.artists;    /* snip */    entry.innerHTML = artists[i].name + artists[i].id;    /* snip */}