title: Group By and Sum using Underscore/Lodash
body: <p>I have JSON like this: </p>
  
  <pre><code>[
    {
       platformId: 1,
       payout: 15,
       numOfPeople: 4
    },
    {
       platformId: 1,
       payout: 12,
       numOfPeople: 3
  
    },
    {
       platformId: 2,
       payout: 6,
       numOfPeople: 5
  
    },
    {
       platformId: 2,
       payout: 10,
       numOfPeople: 1
    },
  
  ]
  </code></pre>
  
  <p>And I want to Group it by <code>platformId</code> with sum of <code>payout</code> and <code>numOfPeople</code>.</p>
  
  <p>I.e. in result I want JSON like this:</p>
  
  <pre><code>[
    "1": {
       payout: 27,
       numOfPeople: 7
     },
  
    "2": {
       payout: 16,
       numOfPeople: 6
    }
  ] 
  </code></pre>
  
  <p>I tried to use <code>underscore.js</code>'s <code>_.groupBy</code> method, and it groups fine, but how I can get the SUM of objects properties values like I demonstrated above? </p>