I have a hash hash that I need to filter. I found how to do a search, but he did not answer my question.
Say I have a hash hash:
my %HoH = ( flintstones => { husband => "fred", pal => "barney", town => "springfield" }, jetsons => { husband => "george", wife => "jane", "his boy" => "elroy", }, simpsons => { husband => "homer", wife => "marge", kid => "bart", town => "springfield", }, );
Let me say that I want all the townspeople from the spring field. I want the same hash to be output without strangers.
my %HoH = ( flintstones => { husband => "fred", pal => "barney", town => "springfield" }, simpsons => { husband => "homer", wife => "marge", kid => "bart", town => "springfield", }, );
Seems dumb but can't figure out how to filter struture. The goal would be to iterate all the people of the spring field after filtering.
Of course, I did some research, and the closest I got is the hash fragments. But they seem scary.
source share