title: How Do I Merge An Array Var Into An Object-Array One?
body: <p>I have a var object which is pulled to show events on a calendar.</p>
  
  <p>This is an example of the var:</p>
  
  <pre><code>var myEvents = {'10-02-2013' : '&lt;span&gt;Event1&lt;/span&gt;','10-04-2013' : '&lt;span&gt;Event2&lt;/span&gt;','12-25-2013' : '&lt;span&gt;Christmas Day&lt;/span&gt;','12-31-2013' : '&lt;span&gt;New Year\'s Eve&lt;/span&gt;'};
  </code></pre>
  
  <p>Var myEvents outputs as</p>
  
  <p><strong>Object {10-02-2013: "Event1", 10-04-2013: "Event2", 12-25-2013: "Christmas Day", 12-31-2013: "New Year's Eve"}</strong></p>
  
  <p>Since i also have recurring events of the same kind, i create them on the fly like this:</p>
  
  <pre><code>var day = 4;
  var date = new Date();
  var nextYear = date.getFullYear() + 1;
  var recurring = [];
  
  while(date.getDay() != day)
  {
  date.setDate(date.getDate() + 1)    
  }
  
  while(date.getFullYear() &lt; nextYear)
  {
  var yyyy = date.getFullYear();
  
  var mm = (date.getMonth() + 1);
  mm = (mm &lt; 10) ? '0' + mm : mm;
  
  var dd = date.getDate();
  dd = (dd &lt; 10) ? '0' + dd : dd;
  
  var output = mm + '-' + dd + '-' + yyyy + ' : ' + '&lt;span&gt;Website Update&lt;/span&gt;';
  recurring.push(output);
  date.setDate(date.getDate() + 7);
  }
  </code></pre>
  
  <p>var recurring outputs as</p>
  
  <p><strong>["10-03-2013 : Website Update", "10-10-2013 : Website Update", "10-17-2013 : Website Update", "10-24-2013 : Website Update", "10-31-2013 : Website Update", "11-07-2013 : Website Update", "11-14-2013 : Website Update", "11-21-2013 : Website Update", "11-28-2013 : Website Update", "12-05-2013 : Website Update", "12-12-2013 : Website Update", "12-19-2013 : Website Update", "12-26-2013 : Website Update"]</strong></p>
  
  <p>I need to merge recurring into myEvents, so that when i pull myEvents i get</p>
  
  <p><strong>Object {10-02-2013: "Event1", 10-04-2013: "Event2", 12-25-2013: "Christmas Day", 12-31-2013: "New Year's Eve", 10-03-2013: "Website Update", 10-10-2013: "Website Update", 10-17-2013: "Website Update", 10-24-2013: "Website Update", 10-31-2013: "Website Update", 11-07-2013: "Website Update", 11-14-2013: "Website Update", 11-21-2013: "Website Update", 11-28-2013: "Website Update", 12-05-2013: "Website Update", 12-12-2013: "Website Update", 12-19-2013: "Website Update", 12-26-2013: "Website Update"}</strong></p>
  
  <p>I thought i could just get recurring as a string using </p>
  
  <pre><code>var recurring2 = recurring.join();
  </code></pre>
  
  <p>and then pass it to myEvents like</p>
  
  <pre><code>var myEvents = { recurring2 + ('10-02-2013' : '&lt;span&gt;Event1&lt;/span&gt;','10-04-2013' : '&lt;span&gt;Event2&lt;/span&gt;','12-25-2013' : '&lt;span&gt;Christmas Day&lt;/span&gt;','12-31-2013' : '&lt;span&gt;New Year\'s Eve&lt;/span&gt;')};
  </code></pre>
  
  <p>but yeah...i guess i was a fool. Moving my first steps with javascript, even after a long research i wasn't able to understand how to merge that array var into the object var that i need to pull. 
  How can i achieve that?</p>