title: How to remove nested keys from a hash list in Rails
body: <p>I am now trying for some hours to remove a nested hash key of a hash list.
  I saw many solution non-nested hashs wich looks like this:</p>
  
  <pre><code>   sample_hash = {"key1" =&gt; "value1", "key2" =&gt; "value2"}
     sample_hash.except("key1") 
  </code></pre>
  
  <p>This results in:</p>
  
  <pre><code>  {"key2"=&gt;"value2"}
  </code></pre>
  
  <p>But if I try to use the except method on a hash with nested key then it doesn't work.
  Here my code:</p>
  
  <pre><code>  nested_hash = {"key1"=&gt;"value1", "key2"=&gt;{
                                             "nested_key1"=&gt;"nestedvalue1",
                                             "nested_key2"=&gt;"nestedvalue2"
                                             }
                  }
  
    nested_hash.except("nested_key2")
  </code></pre>
  
  <p>The except() method returns the nested_hash without any changes. I have looked for a solution how I can pass nested hash-keys to the except method, but couldn't find anything. Is it even possible to pass nested keys to this method or should I use some other method which deletes a nested hash key from my hash list?</p>