Say I have a hash like:
h = { '0' => 'foo', 'bar' => 'baz' => '2' => 'yada' }
How would I go about determining if this hash has any numeric keys in it and pulling out the values of those keys?
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.
try this:
remember that I didn’t pulled out the value for you, it just returns a selection of your hash with the desired criteria. Pulling the values out this hash like you’re used to.