I have 2 array and i want find in first array have value of second array is push data of first array but i can't.
Error message : "TypeError: Cannot find function includes in object...."
This my code:
function loadArrInArr(){
var firstArr = ["aaa", "bbb", "ccc"];
var ss = SpreadsheetApp.openByUrl(urldb);
var ws = ss.getSheetByName("sheet1");
var secondArr = ws.getDataRange().getDisplayValues();
var tmpArr = [];
for(var i = 0; i < secondArr.length; i++){
if(firstArr.includes(secondArr[i][0])){ //err this line
tmpArr.push(secondArr[i]);
}
}
}