Skip to navigation
How to access in ruby a key in a nested Hash?
07.12.13
example: we have the hash: Solars => {:Sun=>{"ER"=>"Earth", "VN"=>"Venus", "MR"=>"Mars", "MK"=>"Merkur"}, :Orion=>{"ZE"=>"Zentrum", "XY"=>"Xylon", "RO"=>"Rodum", "ZX"=>"Zenox"}} to get the value of the key ER in Sun we can do: Solars[:Sun]["ER"] Result: => "Earth"
Reply
Anonymous
How to access in ruby a key in a nested Hash?
example: we have the hash: Solars => {:Sun=>{"ER"=>"Earth", "VN"=>"Venus", "MR"=>"Mars", "MK"=>"Merkur"}, :Orion=>{"ZE"=>"Zentrum", "XY"=>"Xylon", "RO"=>"Rodum", "ZX"=>"Zenox"}} to get the value of the key ER in Sun we can do: Solars[:Sun]["ER"] Result: => "Earth"
07.12.13
Reply
Anonymous
Information Epoch 1732394901
Use simple algorithms as well as simple data structures.
Home
Notebook
Contact us