I download a JSON file, by example
I download a JSON file, by example
There were two syntax errors in your script, a silly thing.
for (i = 0; i =
The equal sign there causes an infinite loop. Use .
for (i = 0; i < fileData.query.data.length; i++); {
And there's one; after the loop statement.
Your corrected code:
var poeItem = new function() {
this._getHTMLdata = function(fileData) {
for (var i = 0; i < fileData.query.data.length; i++) {
if (fileData.query.data[i] && fileData.query.data[i].property == 'Has_infobox_HTML') {
return fileData.query.data[i].dataitem[0].item
}
}
}
}