I'm trying to compare the values from 2 google sheets to get the difference. I'm loosely trying to follow Javascript / Google Apps Script compare 2 arrays, return items with NO match.
to do this I'm trying to stringify rows of my 2d value array which I created using:
var values = range.getValues();
I have created a function:
function toArrayOfJson(myArray){
newArray = [];
for(i=0; i<(myArray.length-1); i++){
x= myArray[i]
Logger.log(x);
Logger.log(myArray);
y =JSON.stringify(myArray[i][0])
newArray.push(JSON.stringify(myArray[i]));
}
return newArray;
}
and while debugging I see that
JSON.stringify(myArray[i])
takes a array that looks like:
["none", "none", "Tyler", "TX", "none" ]
to:
"["none", "none", "Tyler", "TX", "none" ]"
Does this look right? Is this the expected appearance for a json stringified array?