The data:
[
["ID","Variação","Nome Site","Obs"],//Headers
[11602,185,"Camisa Teste","Teste da Observação"] //To be pasted
]
This is how the destination is:
| Obs | Nome Site | Variação | ID |
|---|
I understand I could take the approach below, but considering that the dataset has more then 40 columns, this is not that feasible:
var data = sheet.getRange(1,1,2,4).getValues();
var obs = data.map(function(e){return e[0];});
var NomeSite = data.map(function(e){return e[1];});
...
How would I go about finding the header and "pasting" the data in that case?
Thank you!
