I'm very bad at coding, so probably this will be the most stupid question possible. I want to find a certain value in a JSON by his position in the array. The problem is that the IDs of the elements aren't sorted but they are 'random' numbers (See the photo). My question is, how can I read a certain value from an element by his position in the array? For example the ID 1001 is in position 0 etc... If I use json['data'][1001][...] i can read separately it but it's difficult to write them using a for cicle.
The JSON is LINK
function myFunction() {
var response = UrlFetchApp.fetch("http://ddragon.leagueoflegends.com/cdn/"+12.5+".1/data/en_US/item.json");
var content = response.getContentText();
var json = JSON.parse(content);
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("ITEMS");
var items = sheet.getActiveRange();
var itemsPosition = Object.keys(json['data']);
Logger.log(json['data'][1001]['name']); //works with IDs, I obtain 'Boots'
Logger.log(json['data'][0]['name']); // doesnt work with position
Logger.log(json['data'[0]['name']); // doesnt work
}