title: How to rebuild an array in Javascript?
body: <p>I have an array that's like this:</p>
  
  <pre><code>[
      [ "bar1", "bar2" ],
      [ "bar1", "bar2" ],
      [ "bar1", "bar2" ]      
  ]
  </code></pre>
  
  <p>I'd like to rebuild with named properties, like this:</p>
  
  <pre><code>[
      { foo1: "bar1", foo2: "bar2" },
      { foo1: "bar1", foo2: "bar2" },
      { foo1: "bar1", foo2: "bar2" }
  ]
  </code></pre>
  
  <p>Currently I am manually looping through the array and building a new one. But is there a better way to do this?</p>
  
  <p>Thanks!</p>