Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

164
Visualizações
How to use map to insert key-value pair in google appScript in this unique case?

Here is the my sample code:

const feildName = new Map();
  var numberOfCurlyWords = arrayOfAllCurlyBracesWords.length;

  for(var i = 0; i< numberOfCurlyWords;i++){

    for(var j = 0; j<cols;j++){
      
      // Logger.log(arrayOfAllCurlyBracesWords[i]); 
      // Logger.log(studentData[0][j] + "   First");

      if(arrayOfAllCurlyBracesWords[i].toLowerCase() == studentData[0][j].toLowerCase()){
        Logger.log(arrayOfAllCurlyBracesWords[i]); 
      Logger.log(studentData[0][j] + "Doneee");

      // Need to understand how to insert values in map in appscript
        Logger.log("studentData:- "+studentData[0][j]+" j:- "+j);
        feildName.set(studentData[0][j],j);
          Logger.log(feildName.entries());

      }

    }
  }

And here is the image of the output which I receive:

enter image description here

Can you please help me to figure out why is the map still empty and why is the map.set() functioning here and how can I make it work?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda