I have an array of hashes where I need to find and store matches based on one matching value between the hashes.
a = [{:id => 1, :name => \"Jim\", :em
I tested this and it will do exactly what you want:
b = a.group_by { |h| h[:name] }.values.select { |a| a.size > 1 }.flatten
However, you might want to look at some of the intermediate objects produced in that calculation and see if those are more useful to you.