i have a data response from API.
and how to loop this data, cause i only get first data. and this data not array.
data = [{"gamename":"game 1","gamelink":"link 1","image_link":"image 1","startfrom":"1"},{"gamename":"game 2","gamelink":"link 2","image_link":"imgae 2","startfrom":"2"}]
var json = response.data[0].games;
console.log(json);
if(Array.isArray(json)){
console.log('array');
}else{
console.log('not array');
}
for (var i = 0; i < json.length; i++) {
console.log('gamename : ' +json[i].gamename+ " - game link: " +json[i].image_link);
}