I'm trying to write a map(key, value) pair to google sheets using app script. I have tried using the method below
var crNew = SpreadsheetApp.create("newWorksheetName",1,1);
var ssNew = SpreadsheetApp.openByUrl(crNew.getUrl());
var x=ssNew.getRange("A1");
x.setValues(apimap.keys,apimap.values);
but I'm getting an error as follows
Exception: The parameters (String,String) don't match the method signature for SpreadsheetApp.Range.setValues. myfunction @ Code.gs:102
Can anyone please tell that where i'm doing wrong.The line 102 is this one x.setValues(apimap.keys,apimap.values);
