Hello,

I have this array of hashes :

data = [
   {age: 40, sex: :m},
   {age: 24, sex: :f},
   {age: 56, sex: :m},
   {age: 45, sex: :m},
   {age: 23, sex: :f}
]

Now I try to find all the people which sex is female so sex: f
I did try this :

data.select{ |data2| data2[:sex] == ":f"}

But I do not get any output.

Where did I go wrong here ?

Roelof