How do I get the value of a key or the key's presence from a nested hash?
For example:
a = { "a"=> { "b" => 1, "c" => { "d" => 2, "e" => { "f" => 3 } }}, "g" => 4}
Is there any direct method to get the value of "f"? Or is there a method to know the presence of key in the nested hash?
Or, to avoid errors: