Get an array with all the values from a hash with values: : Hash values « Hash « Ruby






Get an array with all the values from a hash with values:


zip = { 1 => "One", 2 => "Two", 3 => "Three",
4 => "Four", 5 => "Five", 6 => "Six", 7 =>
"Seven", 8 => "Eight", 9 => "Eight" }

puts zip.values 

 








Related examples in the same category

1.Get all values as an array
2.what is the default value for a hash