I\'m new to Ruby and don\'t know how to add new item to already existing hash. For example, first I construct hash:
hash = {item1: 1}
after
It's as simple as:
irb(main):001:0> hash = {:item1 => 1} => {:item1=>1} irb(main):002:0> hash[:item2] = 2 => 2 irb(main):003:0> hash => {:item1=>1, :item2=>2}