title: Split array values to object?
body: <p>I was wondering how to convert an array to an object by splitting the values ?</p>
  
  <pre><code>var obj = {
      id: '',
      val: ''
  }
  </code></pre>
  
  <p>By this I mean - if I have an array like</p>
  
  <p><code>["abc12", "abc1", "def12", "abc454"]</code></p>
  
  <p>How I could <code>split</code> the first 3 values off - so it end up like an object like:</p>
  
  <pre><code>{id: 'abc', val: 12}, {id: 'abc', val: 1} ...
  </code></pre>