Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"_id":"p1","comment":[{_id:"c1",reply:[]}]}]
Query
db.collection.update({"_id":"p1","comment._id":"c1"},{$push:{"comment.$.reply":{"_id":"r1","username":"username1","comment":"hello world"}}})
Result