Database

[{"id":1,"type":"Male"},{"id":2,"type":"Female"},{"id":3,"type":"Rather not say"},{"id":4,"type":"Other"},{"id":5,"type":"Male"},{"id":6,"type":"Female"},]

Query

db.collection.aggregate([{$group:{_id:"$type",}},{$project:{_id:0,type:"$_id",}}])

Result