title: Mapping an array of objects to key/value pairs in CoffeeScript
body: <p>I have an array of elements that I would like to apply a mapping to to convert it into key value pairs on a single object (to mimic an associative array).</p>
  
  <p>The approach in <a href="https://stackoverflow.com/questions/8157627/can-destructuring-assignment-be-used-to-effect-a-projection-in-coffeescript">Can destructuring assignment be used to effect a projection in CoffeeScript?</a> does not seem to work for me as it results in a simple array instead of key/value pairs.</p>
  
  <p>My language of choice is CoffeeScript or JavaScript.</p>
  
  <p>An example:</p>
  
  <pre><code>[{name: 'a', value: 'b', other: 'c'}, {name: 'd', value: 'e', other: 'f'}]
  </code></pre>
  
  <p>is supposed to be transformed into:</p>
  
  <pre><code>{
    a: 'b',
    d: 'e'
  }
  </code></pre>
  
  <p>One-liners are preferred. ;-)</p>