title: Dynamically create an array in Javascript
body: <p>I have an ajax request that returns some JSON formatted data. I'm building out a Google Maps display with it so I need to take that data and pass it to a few variables. So I want to build an array like:</p>
  
  <pre><code>var foo = [
      ['A Town', 32.844932, -50.886401, 1, setting1, '&lt;div class="office"&gt;&lt;div class="name"&gt;Smith&lt;/div&gt;&lt;div class="location"&gt;111 Main Street&lt;br /&gt; Breen, MS&lt;br /&gt; 12345&lt;/div&gt;&lt;div class="size"&gt;18 units&lt;br /&gt;300 Foo&lt;/div&gt;&lt;div class="thelink"&gt;&lt;a href="#"&gt;Visit&lt;/a&gt;&lt;br /&gt;&lt;a href="#"&gt;Output&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;'],
      ['B Town', 33.844932, -51.886401, 2, setting1, '&lt;div class="office"&gt;&lt;div class="name"&gt;Jones&lt;/div&gt;&lt;div class="location"&gt;112 Main Street&lt;br /&gt; Breen, MS&lt;br /&gt; 12345&lt;/div&gt;&lt;div class="size"&gt;18 units&lt;br /&gt;300 Foo&lt;/div&gt;&lt;div class="thelink"&gt;&lt;a href="#"&gt;Visit&lt;/a&gt;&lt;br /&gt;&lt;a href="#"&gt;Output&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;'],
  [etc], 
  [etc]
      ];
  </code></pre>
  
  <p>That I can then use to render my google maps locations. I have the JSON data so how do I loop through it and build out such an array? Or is there a better way to do it that I am missing (which is what I suspect, lol)?</p>