My JSON currently looks like this:
{ \"_id\" : 393, \"item\" : 34, \"comments\" : [ { \"name\" : \"kevin\", \"message
Using $elemMatch and $ operator you can update your documents check below query :
$
db.collectionName.update({"_id":393,"comments":{"$elemMatch":{"name":"kevin"}}}, {"$push":{"comments.$.messages":39}})