Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

find subset of two hashes in ruby

hash3 = hash1.keep_if { |k, v| hash2.key? k }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #subset #hashes #ruby
ADD COMMENT
Topic
Name
5+7 =