title: Type Error: Cannot Read Property "x" from undefined. Only when I include an array of values
body: <p>I am trying to loop through values from a google sheet column that first runs through a function to parse a response on a json page to get a unique identifier, then another json response using the unique identifier to find an attribute's value (true or false).</p>
  
  <p>I have tried a "for loop" that I will include in my code </p>
  
  <pre><code>function main(){
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getSheetByName('Pat ID');
    var zdPatIDs = sheet.getRange("A2:A").getValues();
  
    for (id in zdPatIDs){
      var ptArray = getZDUser(zdPatIDs[id])
      // var updateProfile = coldChainOffered(ptArray)
      var response = getResponse(ptArray.name);
    }
  }
  
  // returns requestor ID from value of patients in google sheet
  function getZDUser(zdPatIDs){
    var url = 'https://someURL.com/api/v2/search.json?query='+zdPatIDs
    var options =
     {
       "method": "get",
       "contentType" : "application/json",
       "headers": 
       {
           "Authorization": "Basic " + Utilities.base64Encode("bearer/token:string of numbers")
       },
       "muteHttpExceptions": true
    }
  
    var response = UrlFetchApp.fetch(url, options)
    var response = JSON.parse(response)
    return response.results[0].requester_id
  }
  
  // returns json cold chain offered response from requester id function
  function getResponse(ptArray){
    var url = 'https://someURL.com/api/v2/users/' + ptArray + '.json'
    var options =
      {
        "method": "get",
        "contentType" : "application/json",
        "headers": 
        {
          "Authorization": "Basic " + Utilities.base64Encode("bearer/token:string 
     of numbers")
        },
        "muteHttpExceptions": true
    }
  
    var response = UrlFetchApp.fetch(url, options)
    var response = JSON.parse(response)
    return response.user.user_fields.cold_chain_offered
  }
  </code></pre>
  
  <p>When I only have one value and no for loop the correct response is returned, however when there are multiple I get the type error thrown</p>