Using Swift MongoClient & adding a Projection?

Hoping this is an easy ask … or a point to a doc i’ve missed ?

Using similar syntax to that provided in the docs …
https://docs.mongodb.com/realm/ios/remotely-access-mongodb#use-the-mongoclient-to-query-for-data-in-your-collection

How do i add a ‘projection’ into the client call ??

collection.find(filter: ["_partition": AnyBSON(identity)], { (result) in …

Thanks

I sorted this …
collection.find(filter: ["_partition": AnyBSON(partition)], options: options, { (result) in
option being a FindOptions

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.