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:
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?