title: Lodash groupBy on object preserve keys
body: <p>When using Lodash _.groupBy method on an objects keys, I want to preserve the keys.</p>
  
  <p>Suppose I have the object:</p>
  
  <pre><code>foods = {
      apple: {
          type: 'fruit',
          value: 0
      },
      banana: {
          type: 'fruit',
          value: 1
      },
      broccoli: {
          type: 'vegetable',
          value: 2
      }
  }
  </code></pre>
  
  <p>I would like to do a transformation to get the output</p>
  
  <pre><code>transformedFood = {
      fruit: {
          apple: {
              type: 'fruit',
              value: 0
          },
          banana: {
              type: 'fruit',
              value: 1
          }
      },
      vegetable: {
          broccoli: {
              type: 'vegetable',
              value: 2
          }
      }
  }
  </code></pre>
  
  <p>Doing <code>transformedFood = _.groupBy(foods, 'type')</code> gives the following output:</p>
  
  <pre><code>transformedFood = {
      fruit: {
          {
              type: 'fruit',
              value: 0
          },
          {
              type: 'fruit',
              value: 1
          }
      },
      vegetable: {
          {
              type: 'vegetable',
              value: 2
          }
      }
  }
  </code></pre>
  
  <p>Notice how the original keys are lost.  Anyone know of an elegant way to do this, ideally in a single line lodash function?</p>