title: Adding all relevant elements in array by a given element
body: <p>I'm for some reason hitting a wall here. I need help figuring this out please. I have the following type of 2D array:</p>
  
  <pre><code>[["Bob", "Car", 25000],
  ["Bob", "TV", 5000],
  ["Bob", "dog", 1000],
  ["Sue", "Cat", 1000],
  ["Sue", "Car", 10000],
  ["Bob", "shoes", 100],
  ["Carol", "car", 20000]]
  </code></pre>
  
  <p>And I need to generate an array that is the sum of each of these people's total from the third element of each sub array. ie:</p>
  
  <pre><code>[["Bob", 31100],
  ["Sue", 11000],
  ["Carol", 20000]]
  </code></pre>
  
  <p>Right now I have a complicated and contrived solution using two loops that iterate through the entire array for each of its own elements. Is there an easier more streamlined way to do this? Especially since my data sets will be quite large. I know ruby has a bunch of awesome enumerables that seem like would fit here, but I can't quite think of how to fit them in.</p>