title: Javascript save data in objects or array
body: <p>I am making a drag and drop tool in javascript. 
  I have a collection of images that I can drag and drop into a grid. This grid has 3 rows and 20 columns. </p>
  
  <p>When an image is dragged onto the grid I want to save this data. For example I drag image and drop it on row 1, column 2. How can I save this data in javascript ?</p>
  
  <p>In php this would be:</p>
  
  <pre><code>&lt;?php
  // row 1, column 2
  $savedItems[1][2] = array("image" =&gt; "testimage.jpg", "extra" =&gt; 1);
  
  ?&gt;
  </code></pre>
  
  <p>This way I can check if there is already an image on that spot or not. Or if I want to change the options of the spot I can search in the $savedItems array. </p>
  
  <p>But how could I save this data in javascript? So it is easy to add and search data in the array.</p>