mongodb aggregation select distinct code example Example: mongodb distinct Db.collection.distinct('searchField')