title: Javascript building objects from string
body: <p>So in working with the google map api examples I am attempting to build a list of objects from a string. My java script is a little week here but the first chuck of code is the loop where I am creating the objects, I think.</p>
  
  <p>The Locations parts is what it should look like in the end. If I use the locations with the objects the function works. But if i replace it with the loop objects it fails.</p>
  
  <pre><code>var myStr = "bob|44.654990|-88.129186|7:20 PM,karen|44.469493|-88.087746|8:19 PM";
  
  var splitLocations = myStr.split(",");
  var daLocs = [];
  for(var z=0;z&lt;splitLocations.length;z++){
      var breakdown = splitLocations[z].split("|");
      daLocs += '[' + breakdown[0] + ',' + breakdown[1] + ',' + breakdown[2] + ',' + z + '],';
  }
  var locations = [
      ['bob', 44.654990, -88.129186, 5],
      ['karen', 44.469493, -88.087746, 4]
  ]
  </code></pre>