title: Google Spreadsheet - return values to multiple columns
body: <p>I'm trying to do something that is beyond my  junior coding capabilities.  I have created a function that will parse API data into Google Spreadsheet, but no matter what I've tried (and searched online for answers), the results are only being posted to a single column.</p>
  
  <p>The code I am using currently is:</p>
  
  <pre><code>function getAPIdata (URL,key){
    var apiurl = "https://example.com/Site/"+URL+"/students?&amp;ID="+key
    var rank_data = parse(apiurl)
    var result = []
    var data_dictionary = rank_data.Student
    for (var i in data_dictionary){
    result.push(data_dictionary[i].Name)
    result.push(data_dictionary[i].Grade)
    }  
    return result
  }
  </code></pre>
  
  <p>The data in question that is being parsed is </p>
  
  <pre><code>Student": [
  {
      "Name": ​Adam,
      "Grade": 75
  },
  {
      "Name": ​Alan,
      "Grade": 90
  }
  </code></pre>
  
  <p>What is happening is that when I call the function in excel I am getting a single column with:</p>
  
  <pre><code>Adam 
  75
  Alan
  90
  </code></pre>
  
  <p>What I would like to do is have the following (spaces here delineate another column)</p>
  
  <pre><code>Adam    75
  Alan    90
  </code></pre>
  
  <p>Basically, I have a 1x4 output and I would like a 2x2 output. Is there anyway I could do this?  I realize I can call the function twice and push different data sets each time, but in this case I can only call the API once for all data.  I thought about potentially pulling the data, caching it but before I delve down learning a path that will not bear fruit, I was hoping some of the experts here could weigh in.</p>
  
  <p>Thanks for reading!</p>