title: Efficient way to group this ruby array of objects
body: <p>I have an array of instances of model <code>Foo</code>. <code>Foo</code> is an Ohm based data store. Each instance of <code>Foo</code> has <code>an_id</code> and integer attributes such as <code>follows</code>, <code>likes</code>. If there are two instances of <code>Foo</code> with the same <code>an_id</code>, I'd love to add the <code>follows</code> and <code>likes</code> attributes together. The solution I had was to create a hash where each key is an <code>an_id</code> of the array, and keep the state there. If the array is large enough, this is not efficient as I need each object back into an array. I'd love to group the array by <code>Foo#an_id</code> and merge/add the counter attributes together and pop that back into the array. Is something like this currently supported?</p>