title: What would be a good way of looping through an API?
body: <p>I'm trying to figure out a good way to loop through an array and so far I've only been able to figure out how to get through one at a time. I'm assuming that I need to make a forEach statement, but not exactly sure how to word said statement. Do any of you happen to know a good way of doing this? </p>
  
  <p>Below is my node.js app file with the API key removed</p>
  
  <pre><code>request("https://api.sportradar.us/ncaamb-t3/games/" + yyyy + "/" + mm + "/" + dd + "/schedule.json?api_key=", function(error, response, body){
      if(!error &amp;&amp; response.statusCode == 200){
          var data = JSON.parse(body);
      T.post('statuses/update', { status: (data["games"][6]["home"]["name"]) + " Vs " + (data["games"][6]["away"]["name"]) }, function(err, data, response) {
    console.log(data);
  });
         }
    }); 
  </code></pre>
  
  <p>Here is an example of the array that I'm trying to loop through: </p>
  
  <p>games: </p>
  
  <pre><code>  [ { id: 'f46c9795-a8f1-4ca3-8960-3788fb6a37c5',
         status: 'scheduled',
         coverage: 'extended_boxscore',
         scheduled: '2017-02-28T00:00:00+00:00',
         conference_game: true,
         venue: [Object],
         broadcast: [Object],
         home: [Object],
         away: [Object] },
       { id: '0e93d1d1-2d57-4524-b95f-d9d1b133b95f',
         status: 'scheduled',
         coverage: 'full',
         scheduled: '2017-02-28T00:00:00+00:00',
         conference_game: true,
         venue: [Object],
         broadcast: [Object],
         home: [Object],
         away: [Object] },
       { id: '7eb44074-4656-489a-976d-abfcbd669a7c',
         status: 'scheduled',
         coverage: 'extended_boxscore',
         scheduled: '2017-02-28T00:00:00+00:00',
         conference_game: true,
         venue: [Object],
         home: [Object],
         away: [Object] },
       { id: '76fed39a-f931-4243-885d-86b14da93e4a',
         title: 'Atlantic Sun - Quarterfinal 3',
         status: 'scheduled',
         coverage: 'full',
         scheduled: '2017-02-28T00:00:00+00:00',
         conference_game: false,
         venue: [Object],
         broadcast: [Object],
         home: [Object],
         away: [Object] },
  </code></pre>
  
  <p>as you can see I have a number [6] inputted for both the home and away teams, as it's the only way that it seems to work for me, otherwise it gives me an error because it's an object if I just write it like this (<code>data["games"]["home"]["name"]</code>) any suggestions?</p>