So I have a hash like this:
hash = { "a"=>[1, 2, 3], "b"=>[18, 21, 9] }
I would like to get the whole array, not just the values.
It seems like this should work:
hash.each{|key,value| value}
[1, 2, 3]
[18, 21, 9]
But what I get is the individual elements of the array-1, 2, 3. I know I can do hash.values, but that gives an array of arrays with no keys. I need the key/value(array) pair. Thoughts?