get distinct values on mongodb query after query code example Example: mongodb distinct Db.collection.distinct('searchField')