Support for distinct in Mongo Query

Hi, I am attempting to hook up a mongo query using the RAW query type. Something like the example:
{
“find”: “restaurants”,
“filter”: { “rating”: { “$gte”: 9 }, “cuisine”: “italian” },
“projection”: { “name”: 1 },
“sort”: { “name”: 1 },
“limit”: 5,
}
I’m after a method or tag that would give all the distinct “name” in the example above.
Mongo supports the distinct keyword on the collection, but i don’t think that is in the RAW query.
TIA

Hey @Elroy!
I believe you are looking for this - distinct in mongoDB

TLDR;
{ distinct: “<collection_name>”, key: “<property_name>” } should give you a list of distinct values of property from the collection.

Beautiful thanx, it works.

Apologies, additional note the sorting does not work.
ie
{ distinct: “<collection_name>”, key: “<property_name>” , sort : “<property_name>”}
Gives a bson error?