title: Convert an array to an array of objects
body: <p>How I can convert an array to an array of JavaScript objects.</p>
  
  <p>For example I have an array as </p>
  
  <pre><code>data = [
      ["fruits","frozen","fresh","rotten"],
      ["apples",884,494,494],
      ["oranges",4848,494,4949],
      ["kiwi",848,33,33]
  ]
  </code></pre>
  
  <p>I want to convert it to a name value pair.</p>
  
  <p>For example, first object in the resulting collection would be</p>
  
  <pre><code> {"fruits": "apple", "frozen": 884, "fresh": 494, "rotten": 494}
  </code></pre>
  
  <p>and so on for rest of the data.</p>