KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this collection: [{ "_id" : 7, "category" : "Festival", "comments" : [ { "_id" : ObjectId("4da4e7d1590295d4eb81c0c7"), "usr" : "Mila", "txt" : "This is a comment", "date" : "4/12/11" } ] }] All I want is to push insert a new field inside comments like this: [{ "_id" : 7, "category" : "Festival", "comments" : [ { "_id" : ObjectId("4da4e7d1590295d4eb81c0c7"), "usr" : "Mila", "txt" : "This is a comment", "date" : "4/12/11", "type": "abc" // find the parent doc with id=7 & insert this inside comments } ] }] How can I insert inside the comments subdocument?
Tags (comma-separated)
Save Edits
Cancel