deleting a comnent from arrays of comments in mongodb code example
Example: deleting a comnent from arrays of comments in mongodb
TestData.update(
{},
{$pull: {comments: req.params.comment_id}},
{ multi: true },
function(err, data){
console.log(err, data);
});