title: Split array into pairs and pack into object
body: <p>I have a an array with CSS text declarations like this: <code>['display: none ', 'opacity: 0.1', ' color: #ff0000']</code></p>
  
  <p>I want to split these into object key/value notation so it ends up like this:</p>
  
  <pre><code>{
    display: 'none',
    opacity: 0.1,
    color: '#ffffff'
  }
  </code></pre>
  
  <p><em>edit</em>: I've got a <s>working</s> wrong example, but it seems overly complicated and it doesnt serve the purpose (d'oh). Do you have a working one?</p>
  
  <pre><code>cssStyleDeclarations.map(function(item) {
    var x = item.split(':');
    var ret = {};
    ret[x[0].trim()] = x[1].trim();
  
    return ret;
  });
  </code></pre>
  
  <p>It returns it as array with an object for each entry (<code>[Object, Object, Object]</code>), but I want it as a pure object.</p>