So, with a regular hash, you can use this to get the keys:
hash.keys
How can I get the keys of the second dimension of a multidimensional hash that looks like this:
{"<id>"=>{"first_name"=>"test", "last_name"=>"test_l", "username"=>"test_user",
"title"=>"Sales Manager", "office"=>"test", "email"=>"test@test.com"}}
<id> unique to each item.
So the keys that I want on top are as follows: first_name, last_name, username, title, office and email
source
share