title: Why does the 'Free/Busy' time for Google Calendar API come back 'Undefined'?
body: <p>I'm new to and learning both Javascript and Google Script, and I'm trying to write a script that checks if a calendar is busy at a certain time. According to <a href="https://developers.google.com/google-apps/calendar/v3/reference/freebusy/query" rel="nofollow noreferrer">https://developers.google.com/google-apps/calendar/v3/reference/freebusy/query</a>, this should be returned in the format: </p>
  
  <pre><code>{
    "kind": "calendar#freeBusy",
    "timeMin": datetime,
    "timeMax": datetime,
    "calendars": {
      "busy": [{"start": datetime,"end": datetime}]
    }
  }
  </code></pre>
  
  <p>However, I'm using the following code (Simplified to reproduce the issue): </p>
  
  <pre><code>function checkResource() {
   var calendarId = [The Calendars ID removed for privacy];
   var check = {
      items: [{id: calendarId, busy: 'Active'}],
      timeMax: "2014-09-09T21:00:31-00:00",
      timeMin: "2014-09-09T17:00:31-00:00"
   };  
  
   var response = Calendar.Freebusy.query(check);
  
   Logger.log('Response: '+ response);
   Logger.log('Response Calendars: '+ response.calendars.calendarId);
  
   for (var property in response){
      Logger.log('Property: '+ property);
      Logger.log('Property Value: '+ response[property]);
   }
  
   for (var calendarValue in response){
     Logger.log('Calendar Value: '+ response.calendars.calendarValue);
   };
  }
  </code></pre>
  
  <p>Which logs for me all of the calendar properties, but for some reason won't return anything apart from '[object Object]' or 'undefined' when I try to get into the nested 'busy' object.<img src="https://i.stack.imgur.com/NMdv0.jpg" alt="Screenshot of logging output"></p>
  
  <p>The calendar is intentionally busy during this time (there's an event on at 2014-09-09T18:00:00Z which lasts for an hour), and you can see this when I log the entire function (Logger.log('Response: '+ response); shows the calendar ID, 'busy' and the start and end time), so I've clearly gone wrong with my code. </p>
  
  <p>Any assistance would be great. </p>