I have some nested hashes and I wanted to be able to spit out the
differences between the second key from other hashes, ignoring the
deeper
key/values.
For example,
blah[abc][junk1] = {“some”=>“thing”, “dirt”=>“brown”, “frog”=>“green”}
blah[abc][test1] = {“some”=>“thing”, “dirt”=>“brown”, “frog”=>“green”}
blah[abc][boo1] = {“some”=>“thing”, “dirt”=>“brown”, “frog”=>“green”}
blah[abc][moar1] = {“some”=>“thing”, “dirt”=>“brown”, “frog”=>“green”}
blah[def][junk2] = {“some”=>“thing”, “mud”=>“brown”, “teeth”=>“yellow”}
blah[def][boo1] = {“some”=>“thing”, “dirt”=>“brown”, “frog”=>“green”}
blah[def][moar1] = {“some”=>“thing”, “dirt”=>“brown”, “frog”=>“green”}
blah[ghi][junk3] = {“some”=>“thing”, “heart”=>“red”, “teeth”=>“white”}
blah[ghi][moar1] = {“some”=>“thing”, “dirt”=>“brown”, “frog”=>“green”}
I don’t care about the key/values of (“some”=>“thing”, “dirt”=>“brown”
…) I just want to see what keys are in blah[def] and blah[ghi] and
not in blah[abc] and then the same for blah[def].keys against
blah[abc].keys and blah[ghi].keys
so blah[abc].keys against blah[def] and against blah[ghi]
then blah[def].keys against blah[abc].keys and against blah[ghi].keys
then blah[ghi].keys against blah[def].keys and against blah[abc].keys
I want to be able to see the following type of data
blah[abc] has test1 but not junk2 and junk3
blah[def] has junk2 but not test1, boo1 and junk3
blah[ghi] has junk3 but not boo1, test1, junk1 and junk2
How could I accomplish this.
Thanks for the help,
John