title: Javascript array of key pair objects to JSON
body: <p>I have this array of objects:</p>
  
  <pre><code>0:key:"name" value:"John"
  1:key:"age" value:"30"
  2:key:"car" value:"Ford"
  </code></pre>
  
  <p>How can I turn it into this:</p>
  
  <pre><code>[{ "name":"John", "age":30, "car":"ford" }]
  </code></pre>
  
  <p>I was trying something like this:</p>
  
  <pre><code>tempArray.forEach(function(s) {
      var object = {
          s.key: s.value
      }
  
      newArray.push(object);
  });
  </code></pre>