I have an array
["bob:12 elm st", "sally:100 digital ave", "tom:2324 elmhurst st"]
which I need to convert to
{"bob" => "12 elm st", "sally" => "100 digital ave", "tom" => "2324 elmhurst st"}.
I know I can do
array.each do |e|
k = e.split(":").first
v = e.split(":").last
hash[k] = v
end
Is there a more elegant way to do this?