title: using lodash .groupBy. how to add your own keys for grouped output?
body: <p>I have this sample data returned from an API.</p>
  
  <p>I'm using Lodash's <code>_.groupBy</code> to convert the data into an object I can use better.
  The raw data returned is this:</p>
  
  <pre><code>[
      {
          "name": "jim",
          "color": "blue",
          "age": "22"
      },
      {
          "name": "Sam",
          "color": "blue",
          "age": "33"
      },
      {
          "name": "eddie",
          "color": "green",
          "age": "77"
      }
  ]
  </code></pre>
  
  <p>I want the <code>_.groupBy</code> function to return an object that looks like this:</p>
  
  <pre><code>[
      {
          color: "blue",
          users: [
              {
                  "name": "jim",
                  "color": "blue",
                  "age": "22"
              },
              {
                  "name": "Sam",
                  "color": "blue",
                  "age": "33"
              }
          ]
      },
      {
          color: "green",
          users: [
              {
                  "name": "eddie",
                  "color": "green",
                  "age": "77"
              }
          ]
      }
  ]
  </code></pre>
  
  <p>Currently I'm using </p>
  
  <pre><code>_.groupBy(a, function(b) { return b.color})
  </code></pre>
  
  <p>which is returning this.</p>
  
  <pre><code>{blue: [{..}], green: [{...}]}
  </code></pre>
  
  <p>the groupings are correct, but I'd really like to add the keys I want (<code>color</code>, <code>users</code>). is this possible using <code>_.groupBy</code>? or some other <code>LoDash</code> utility?</p>