title: Convert array into key / value pairs
body: <p>I have pushed different values from nested loops into an object, resulting in something like this:</p>
  
  <pre><code>obj = ["blue", 1, "red", 4, "yellow", 2, "green", 7];
  </code></pre>
  
  <p>But I'd like it to return like this:</p>
  
  <pre><code>obj = [{"blue": 1}, {"red": 4}, {"yellow": 2}, {"green": 7}];
  </code></pre>
  
  <p>Do I have to manually build that syntax or is there a quicker way?</p>