J
Jon Stenqvist
Hi,
I have a array that looks like this
Type = [["key","value"],["key..","value.."],["..",".."]]
Now i want to the the display (value) when i have the key, is this a OK
way to do it? Or is there a better way?
Type.select{|key,disp| key == "H" }.collect{|key,value|value}.to_s
I have a array that looks like this
Type = [["key","value"],["key..","value.."],["..",".."]]
Now i want to the the display (value) when i have the key, is this a OK
way to do it? Or is there a better way?
Type.select{|key,disp| key == "H" }.collect{|key,value|value}.to_s