Okay so here\'s the deal, I\'ve been googling for ages to find a solution to this and while there are many out there, they don\'t seem to do the job I\'m looking for.
Ba
Or if you have an array of [key, value] arrays, you can do:
[key, value]
[[1, 2], [3, 4]].inject({}) do |r, s| r.merge!({s[0] => s[1]}) end # => { 1 => 2, 3 => 4 }