I am new in the MongoDB world and now I am struggling of how can I delete, update element in a nested array field of a document. Here is my sample document:
{
Solution with C# MongoDB Driver. Delete a single nested element.
var filter = Builders.Filter.Where(ym => ym.Id == ymId); var update = Builders.Update.PullFilter(ym => ym.NestedItems, Builders.Filter.Where(nm => nm.Id == nestedItemId)); _repository.Update(filter, update);