I have an array of hashes like so:
[{\"testPARAM1\"=>\"testVAL1\"}, {\"testPARAM2\"=>\"testVAL2\"}]
And I\'m trying to map this onto sin
Use #inject
hashes = [{"testPARAM1"=>"testVAL1"}, {"testPARAM2"=>"testVAL2"}] merged = hashes.inject({}) { |aggregate, hash| aggregate.merge hash } merged # => {"testPARAM1"=>"testVAL1", "testPARAM2"=>"testVAL2"}