title: Map 3D array to cells in Google Sheet - Apps Scirpt
body: <p>Hey I am trying to place arrays of data into a Google Sheet. I've got a list of dimensions which I am mapping through a function calling an external API to get numerical values for each dimension. I then want to input these into my spreadsheet - however I am unsure how to do this. I would also like to input the specific Date into a column as well. So ideal output would be column A = date, column B = dimensions, column C = numerical value.</p>
  <pre><code>function function() {
    var dimensions = [&quot;CN&quot;,&quot;IN&quot;,&quot;NZ&quot;,&quot;US&quot;,&quot;UK&quot;,&quot;MY&quot;,&quot;SG&quot;,&quot;JP&quot;,&quot;KR&quot;,&quot;DE&quot;];
    var counts = dimensions.map(dim =&gt; [getValue(dim)]);
  }
  
  function getValue(dim) {
    // ive removed the detail for the API call
    var response = UrlFetchApp.fetch(fetchUrl, params);
    var json = JSON.parse(response.getContentText());
    var dataSet = json.results;
  
    Logger.log(dataSet);
  
    return dataSet;
  
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/OWWZW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OWWZW.png" alt="Logger results" /></a></p>