title: Push array into object
body: <p>I have three same sized arrays, <code>lat[], lon[], title[]</code>. I need to create an object in this format</p>
  
  <pre><code>locations = [
      {
          lat: 45.4654,
          lon: 9.1866,
          title: 'Milan, Italy'
      },
      {
          lat: 47.36854,
          lon: 8.53910,
          title: 'Zurich, Switzerland'
      },
      {
          lat: 48.892,
          lon: 2.359,
          title: 'Paris, France'
      }
  ];
  </code></pre>
  
  <p>And I have done this so far</p>
  
  <pre><code>  var locations = {};
    var lat = [1, 2, 3];
    var lon = [4, 5, 6];
    var title = ['title 1', 'title 2', 'title 3'];
    var numLocation = $lat.length;
  
    for (var j=0; j &lt; numLocation; j++) {
  
      locations[j] = {};
      locations[j].lat = lat[j];
      locations[j].lon = lon[j];
      locations[j].title = title[j];
    }
  </code></pre>
  
  <p>But I get an object like this  <code>Object { 0={...},  1={...},  2={...},  more...}</code>
  when I need one like  <code>[Object { lat=45.4654,  lon=9.1866,  title="Milan, Italy",  more...}, Object { lat=47.36854,  lon=8.5391,  title="Zurich, Switzerland",  more...}, Object { lat=48.892,  lon=2.359,  title="Paris, France",  more...}, Object { lat=48.13654,  lon=11.57706,  title="Munich, Germany",  more...}]</code></p>
  
  <p>Sorry if I don't use technical terminology but I don't really know a lot of javascript and I'm just learning it day by day. I hope someone can help.</p>