I have a hash: hash1
hash1 = Hash.new
I have another hash: hash2
hash2 = Hash.new
I added the following key-value pair in it:
hash2.store("k1","v1")
hash2.store("k2","v2")
hash2.store("k3",["v3","v4"])
Now, I want to have "key1"
in hash1
which will be associated with "k1", "k2", "k3"
of hash2
.
I want something of this sort:
{"key1"=>{"k1"=>"v1", "k2"=>"v2", "k3"=>["v3", "v4"]}}
How do I associate hash1 and hash2.