Created
April 11, 2012 23:23
-
-
Save gmgent/2363441 to your computer and use it in GitHub Desktop.
ruby_find_dup_hash_on_key_in_array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts array_of_hashes.select{|i| array_of_hashes.select{|s|s[:key]==i[:key]}.count > 1}.map {|show| "#{show[:key]} #{show[:name]}"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment