array ke hash ruby
# array = [["a", 1], ["b", 2], ["c", 3]]
array = [[:a, 1], [:b, 2], [:c, 3]]
# convert array to hash
hash = Hash[array]
puts hash
# Stdout/output:
# {:a=>1, :b=>2, :c=>3}
Old-fashioned Otter