रूबी में नेस्टेड हैश के साथ इस तरह हैश को देखते हुए द्वारा रूबी हैश से हटाना (गहरी भिन्न हो सकते हैं):दीप बिंदीदार पथ
hash = {"status_message"=>
{ "destination_does_not_exist"=>
{"message_header" => "Zielordner existiert nicht",
"message_body" => "Der Zielordner für das Backup existiert nicht mehr.",
"corrective_action" => "Erstellen Sie den Zielordner."
}
}
}
मैं कैसे कुंजी नष्ट कर सकते हैं और अपने सभी बच्चों को सरल "बिंदीदार" अंकन का उपयोग को महत्व देता है? कुछ की तरह:
path = "status_message.destination_does_not_exist.message_header"
hash.delete!(path)
http://stackoverflow.com/questions/6423484/how-do-i-convert-hash-keys-to-method-names –