> -----Original Message-----
> From: superdisconnect / hotmail.com [mailto:superdisconnect / hotmail.com]
> Sent: Monday, August 03, 2009 10:27 PM
> To: ruby-talk ML
> Subject: How to extract only needed attribute from an array
> 
> 
> I have an object called Tags with id and name ==> [ tag.id , tag.name]
> 
> | [1 , aaa]   |
> 
> | [ 3 , bbb]  |
> 
> | [ 5 , ccc]  |
> 
> | [ 6 , dfd]  |
> 
> | [ 7 , waf]  |
> 
> | [ 11 , vee] |
> 
> There is an array with the list of tags , i just want to extract all
> tag.id
> as a new array, what is the easiest way to do
> --
> Posted via http://www.ruby-forum.com/.

tags.map { |t| t.id }