Question: If I have a class that looks like below, how to I pull out just the last name from each instance a collection into an array?

```
class Person
  include :Mongoid::Document

  field :first_name
  field :middle_name
  field :last_name
  field :email_address

end

Person.all # What do I do after I have the collection?

```

Answer: 
To return an array from a collection:

```
Person.where(blah).collect(&:last_name)

```

[An explanation of &:object](https://stackoverflow.com/questions/1961030/ruby-ruby-on-rails-ampersand-colon-shortcut)
Person.where(...search...).only(:last\_name)

<http://mongoid.org/docs/querying/criteria.html#only>