title: Hash of Hashes in Ruby
body: <p>I have a problem to solve, There is a simple supermarket program where all items are sorted and stored in a hash(key: Product ID) that has values such as price, manufacturer, expiry etc.
  For a purpose, i need to group items according to price.<br>
  I need to create a hash (keyed: price) containing another hash (keyed: Product ID). </p>
  
  <p>Code goes like this:</p>
  
  <pre><code>new_Hash = Hash.new(Hash.new)
  items = Hash.new
  SuperMarket_hash.each { |Product_ID, info | new_Hash[info.PRICE].items[Product_ID] }
  </code></pre>
  
  <p>I am getting error for this code. (items : NillClass no method error)</p>