title: How do i group duplicate objects in an array
body: <p>Take for example this array:</p>
  
  <pre><code> [{id: 0, weight: 200}
   {id: 0, weight: 200}
   {id: 1, weight: 75}
   {id: 2, weight: 5}]
  </code></pre>
  
  <p>I need to get it a result of :</p>
  
  <pre><code>[  {id:0, times:2},
     {id:1, times:1},
     {id:2, times:1}]
  </code></pre>