I want to get name value. How do I access it?
json looks like this
var result = null;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
result = JSON.parse(this.responseText);
for(var i = 0; i <= result.total_count; i++)
{
console.log(result.data[i].name);
}
}
});
This is giving me result as I want but with an error
Cannot read property 'name' of undefined in log.
