I have an array like this
records =
[
["a","1"],
["b","2"],
["c","3"]
]
I want to pull out the number 3 given that I know I was looking for the value "c".
I tried this but no luck
search_for = 'c'
test = records.select{ |x| x=search_for}
I am returning the whole array
source
to share