title: Group an array of sales by sellers, get the total from each Seller, order by total sales
body: <p>I have an array like this :</p>
  <pre><code>[
      {
          &quot;orderId&quot;: 1,
          &quot;orderDate&quot;: &quot;2021-04-28T08:20:58Z&quot;,
          &quot;status&quot;: &quot;Confirmed&quot;,
          &quot;sellerName&quot;: &quot;Chris Gilmour&quot;,
          &quot;revenue&quot;: 2316.49
      },
      {
          &quot;orderId&quot;: 2,
          &quot;orderDate&quot;: &quot;2020-12-19T12:30:18Z&quot;,
          &quot;status&quot;: &quot;Confirmed&quot;,
          &quot;sellerName&quot;: &quot;Alanna Sumner&quot;,
          &quot;revenue&quot;: 2928.88
      },
      {
          &quot;orderId&quot;: 4,
          &quot;orderDate&quot;: &quot;2020-12-24T08:00:09Z&quot;,
          &quot;status&quot;: &quot;Confirmed&quot;,
          &quot;sellerName&quot;: &quot;Beth North&quot;,
          &quot;revenue&quot;: 1550.19
      },
      {
          &quot;orderId&quot;: 5,
          &quot;orderDate&quot;: &quot;2021-06-06T04:40:48Z&quot;,
          &quot;status&quot;: &quot;Confirmed&quot;,
          &quot;sellerName&quot;: &quot;Laura Ponce&quot;,
          &quot;revenue&quot;: 35.5
      },
      {
          &quot;orderId&quot;: 8,
          &quot;orderDate&quot;: &quot;2021-08-27T05:13:40Z&quot;,
          &quot;status&quot;: &quot;Canceled&quot;,
          &quot;sellerName&quot;: &quot;Blade Newman&quot;,
          &quot;revenue&quot;: 2957.29
      },
      {
          &quot;orderId&quot;: 9,
          &quot;orderDate&quot;: &quot;2020-12-26T08:07:57Z&quot;,
          &quot;status&quot;: &quot;Confirmed&quot;,
          &quot;sellerName&quot;: &quot;Alanna Sumner&quot;,
          &quot;revenue&quot;: 2164.75
      },
      {
          &quot;orderId&quot;: 10,
          &quot;orderDate&quot;: &quot;2021-04-23T18:44:19Z&quot;,
          &quot;status&quot;: &quot;Confirmed&quot;,
          &quot;sellerName&quot;: &quot;Blade Newman&quot;,
          &quot;revenue&quot;: 2287.55
      }
  ]
  </code></pre>
  <p>I want the new Array to be :</p>
  <pre><code>[ 
      {
          &quot;sellerName&quot;: &quot;Blade Newman&quot;,
          &quot;totalRevenue&quot;: 5244.84
      },
      {
          &quot;sellerName&quot;: &quot;Alanna Sumner&quot;,
          &quot;totalRevenue&quot;: 5093.63
      },
      { 
          &quot;sellerName&quot;: &quot;Chris Gilmour&quot;,
          &quot;totalRevenue&quot; : 2316.49
      },
      {
          &quot;sellerName&quot;: &quot;Beth North&quot;,
          &quot;totalRevenue&quot;: 1550.19
      }
  
  ]
  </code></pre>
  <p>So I want the array to be grouped by sellerName, the amount sold summed up and ordered By sellers with the most total sales.</p>
  <p>I tried to solve this by using forEachs and reduces but I failed, if anyone can help me that would be great.</p>
  <p>Thanks in advance.</p>