title: How to add data to a 2 dimensional array in javascript
body: <p>I am trying to add values into an array but for some reason it is not working. I am new to JavaScript.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>eventsArray = new Array();
  
  $.each(xmlJsonObj.feed.entry, function(index, value){
      eventsArray[index] = new Array('title' = value.title, 'date' = value.date[1]);
  });
  </code></pre>
  
  <p>So basically I am pulling out some values from the json object and want to save them as key-value pairs in an array (multidimensional as each event has several values).</p>
  
  <p>This array will later be sorted by date.</p>
  
  <p>I am currently getting the following error:</p>
  
  <pre><code>ReferenceError: Left side of assignment is not a reference.
  </code></pre>
  
  <p>I am new to JavaScript and don't really understand whats wrong. Tried to look at some examples but still can't see a good example of creating two dimensional arrays with JavaScript (or objects, as everything in JS is an object) in a loop like this.</p>
  
  <p>I would be very thankfull for any help or tips.</p>