C
cleaner416
For some reason I can't get my head wrapped around this trivial
exercise. I have an array of hashes like so
a = [ { :some_key => :some_value }, { :another_key
=> :another_value } ]
And I would like to flatten it to single hash in one line so I get
{ :some_key => :some_value, :another_key => :another_value }
Any suggestions?
exercise. I have an array of hashes like so
a = [ { :some_key => :some_value }, { :another_key
=> :another_value } ]
And I would like to flatten it to single hash in one line so I get
{ :some_key => :some_value, :another_key => :another_value }
Any suggestions?