for example:
[ (id=>1, email=>'tim@tim.com', name=>'tim'),
(id=>2, email=>'joe@joe.com', name=>'joe'),
(id=>3, email=>'dan@dan.com', name=>'dan') ]
How can I extract the email column and put it in its own array?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Let’s call your array
users. You can do this:This looks at the hashes one by one, calling them
u, extracts the:emailkey, and returns the results in a new array of user emails.