How do you pluck out a hash key that has for example
Hash 1 {sample => {apple => 1, guest_email => [email protected] }}
Hash 2 {guest => {email => [email protected]}}
Lets say I want 1 method that will pluck out the email from either of those hashes, is there any way I can that like lets say hash.get_key_match("email")
I guess that you need the deep search. There is no method from the box.
You need use recursion for this goal.
I suspect that your issue can be solved by: