Aggregation $group
This aggregation stage groups documents by the unique _id expression provided.
Note: Don't confuse this
_idexpression with the_idObjectId provided to each document.
Example
db.listingsAndReviews.aggregate(
[ { $group : { _id : "$property_type" } } ]
)
This will return the distinct values from the property_type field.