How can I convert this array to a hash ?
array.to_hash
Hash[*array.collect {|v| [v.first, v.last] }.flatten]
array.inject({}) {|hash, e| hash[e.first] = e.last }
Hash[array]