title: How do I fetch and parse JSON data to Google Sheets Script?
body: <p>EDIT*** Modified the question now that I have a proper source...</p>
  
  <p>I am trying to copy a communication log to Google Sheets and don't know enough about scripting ( or JSON for that matter) to pull this off. I just want to the spreadsheet to emulate/copy the entire log that is available.</p>
  
  <p>The script run and there are no errors, but nothing goes onto the spreadsheet.
  The code snippet I am trying to use is here:</p>
  
  <pre><code>function pullJSON() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheets = ss.getSheets();
  var sheet = ss.getActiveSheet();
  
  
  var url="https://api.brandmeister.network/v1.0/repeater/?action=get&amp;q=1148311"; // Paste your JSON URL here
  
  var response = UrlFetchApp.fetch(url); // get feed
  var dataAll = JSON.parse(response.getContentText()); //
  var dataSet = dataAll;
  
  
  var rows = [],
    data;
  
  
  for (i = 0; i &lt; dataSet.length; i++) {
  data = dataSet[i];
  rows.push([data.repeaterid, data.callsign]); //your JSON entities here
  }
  
   data = sheet.getRange(1,1,99,10).getValues(); 
   sheet.getRange(1,1,99,10).setValues(data);
  
  }
  </code></pre>
  
  <p>I would like to know how to do this, as well as an educational explanation as to what this error is and why I am getting it, I am trying to learn not just get help.</p>
  
  <p>The spreadsheet is a blank canvas, so if I need to do something special to it for the script to work, could that please be explained as well? Thank you all.</p>