title: MongoDB: Updating subdocument
body: <p>I have this collection:</p>
  
  <pre><code>[{ "_id" : 7,
     "category" : "Festival",
     "comments" : [
          {
                  "_id" : ObjectId("4da4e7d1590295d4eb81c0c7"),
                  "usr" : "Mila",
                  "txt" : "This is a comment",
                  "date" : "4/12/11"
          }
      ]
  }]
  </code></pre>
  
  <p>All I want is to push insert a new field inside comments like this:</p>
  
  <pre><code>[{ "_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 &amp; insert this inside comments
          }
      ]
  }]
  </code></pre>
  
  <p>How can I insert inside the comments subdocument?</p>