Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!