How to define numbers inside a string to map JSON in Javascript?

Solution for How to define numbers inside a string to map JSON in Javascript?
is Given Below:

The API has numbers to define each of the data containers, I’ve tried to use several ways to be able to define these numbers, but without success.

In the image you can see the map clubes.262 clubes.264 clubes.265 clubes.266 clubes.275

enter image description here

My attempts:

var idclub = clubes[i].id;
var idclub = clubes.[i].id;
var idclub = clubes[0][i].id;
var idclub = clubes. + i + .id;

The complete script for easy viewing:

function MenuMercadoCartola1() {
  var url="";
  var response = UrlFetchApp.fetch(url);
  var results = JSON.parse(response.getContentText());

  var clubes = results.clubes;
  var table = [['ID do Clubes','Nome do Clube']];
  for (var i = 0; i < clubes.length; i++) {
    var idclub = clubes[i].id;
    var nameclub = clubes[i].nome;

  var sheet = SpreadsheetApp.getActive().getSheetByName('Menu');
  sheet.getRange(1,1, table.length, table[0].length).setValues(table);

It appears that you should be using a ‘for in’ loop.

Your code revised:

for (var idclub in clubes)
    idclub = +idclub;
    var nameclub = clubes[idclub].nome;
    table.push([idclub, nameclub]);

Your loop assumes clubes is an array however it is an object which means you could have to iterate on it using a for (var ... in ...) loop.