title: Collapse an array of objects on a property value in javascript
body: <p>How collapse and array on a property in order to turn:</p>
  
  <pre><code>[ { key: 'black', value: [ '2', '3', '9' ] },
    { key: 'black', value: [ '1' ] },
    { key: 'gold', value: [ '2', '3' ] },
    { key: 'gold', value: [ '1' ] },
    { key: 'red', value: [ '9' ] },
    { key: 'white', value: [ '2', '3' ] },
    { key: 'white', value: [ '1' ] } ]
  </code></pre>
  
  <p>...into:</p>
  
  <pre><code>[ { key: 'black', value: [ '1', '2', '3', '9' ] },
    { key: 'gold', value: [ '1', '2', '3' ] },
    { key: 'red', value: [ '9' ] },
    { key: 'white', value: [ '1', '2', '3' ] } ]
  </code></pre>
  
  <p>...with javascript.</p>
  
  <p>I feel like there should be a fairly straightforward way to do this with lodash or Array.reduce, but I cant for the life of me work out how to do it.</p>