@users = [
{id:"0", name:"Thomas One", email:"thomas@fake.nl", password:"adkdjaso"},
{id:"1", name:"James Five", email:"j4@fake.nl", password:"jdajdlae"},
{id:"3", name:"Gordon Four", email:"g4@fake.nl", password:"adsldsae"}
]
def getId
puts "what is your email address?"
@account = gets.chomp
if @users.find |x| x[email:] == @account
puts "Welcome #{@users[name:]}"
break
else
puts "your account does not exist try again!"
end
end
how do i search through an array of hashes based of the users email and then print out his name ?