title: Iterate over multiple JSONs instead of just one
body: <p>I have a bit of jQuery that iterates through some JSON (specifically a Google Calendar feed) and prints out a list item for each event in the calendar. The code looks like this:</p>
  
  <pre><code>// URL for some Google Calendar data
  // (if this link should go down, any gcal feed URL should work just the same)
  var gcalUrl = "http://mikeclaffey.com/sandbox/gcal-embed/example-json-data.js";
  
  // Get list of upcoming events formatted in JSON
  $.getJSON(gcalUrl, function(data){
  
      // Parse and render each event
      $.each(data.feed.entry, function(i, item){
  
          // Render the event
          $("#gcal-events li").last().after( "&lt;li&gt;" + item.title.$t + "&lt;/li&gt;" );
      });
  });
  </code></pre>
  
  <p>I am trying to adapt the code so that it can combine JSON from multiple URLs, but I'm having trouble combining the JSON data into one object. I tried iterating through an array of JSON URLs and combining all the data into one object, but it doesn't seem to create a usable object. Here's my code:</p>
  
  <pre><code>var gcalUrls = ["http://mikeclaffey.com/sandbox/gcal-embed/example-json-data.js"];
  var allData = {};
  
  // Iterate through the array of Google Calendar feed URLs
  $.each(gcalUrls, function(i, url) {
  
      // Download each feed
      $.getJSON(url, function(data){
  
          // Add this feed's data to allData
          $.extend(true, allData, data);
      });
  });
  
  // Parse and render each event
  $.each(data.feed.entry, function(i, item){
  
      // Render the event
      $("#gcal-events li").last().after( "&lt;li&gt;" + item.title.$t + "&lt;/li&gt;" );
  });
  </code></pre>
  
  <p>This code fails to print out anything. What am I doing wrong?</p>