if (json == "items"){ var obj = data[json]; for (var k in obj) { if (obj[k]["article"]) {var itemName = obj[k] ["article"];} } }