MongoDB
suggest changeRemarks
The hardest part is attaching a subdocument to a document that does not exist yet. To get the expected shape, iterate the array with a for loop into a variable and call $doc2.add("Key", "Value"), rather than using foreach on the current array with an index. The subdocument is then assigned in two lines, as in "Tags" = [MongoDB.Bson.BsonDocument] $doc2.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents