I wonder if there is a way to remove an array from the document or not query it at all in a search.
If I have the following document:
{ "_id" : "ddddddd1", "State" : "Open", "Persons" : [ { "_id" : "FA163ED200681EED9AF304EB2DC855CA", "LastName" : "xxxxx", "FirstName" : "dddddddd", "Gender" : "Male", "Contact" : { "Street" : "street 11", "ZipCode" : "4444", "City" : "xxxxxxx", "Country" : "xxxx" }, "SavingRate" : null, "HouseAndLiving" : null } ] }
And now I will select all PersonDetails but without Contact in the Persons. How can I do this with C# MongoDB Driver.
var result = personDetails.find(