Forgive me if this has already been asked, I couldn't find it.
I have an array of objects, like:
[<#Folder id:1, name:'Foo', display_order: 1>,
<#Folder id:1, name:'Bar', display_order: 2>,
<#Folder id:1, name:'Baz', display_order: 3>]
I'd like to convert that array into an array just of the names, like:
['Foo','Bar','Baz']
and, while I'm at it it would be nice if I could use the same technique down the road to create an array from two of the parameters, ie name and display order would look like:
[['Foo',1],['Bar',2],['Baz',3]]
What's the best 'Ruby Way' to do this kind of thing?
Thanks!