I have this :
{
\"_id\" : ObjectId(\"4fb4fd04b748611ca8da0d48\"),
\"Name\" : \"Categories\",
\"categories\" : [{
\"_id\" : ObjectId(\"4fb4fd04b74
Adding an example for my case. Did work but without the dollar sign when entering inside an array:
public async Task AddCustomMetadata()
{
Dictionary dic = new Dictionary();
dic.Add("EntityCustomMetadataFieldId", "5bf81296-feda-6447-b45a-08d5cb91211c");
var filter = Builders.Filter.Eq("_id", "6c7bb4a5-d7cc-4a8d-aa92-b0c89ea0f7fe");
var update = Builders.Update.Push("CustomMetadata.Fields", dic);
await _context.BsonAssets.FindOneAndUpdateAsync(filter, update);
}