sous-document d'incrément Mongoose

BlogPost.update({_id: blogPostId, 'comments._id': commentId}, {$inc:{'comments.$.rating':1}})
    .then((blogPost) => res.status(200).json({
    'status': 'Comment rating is increased.'
}))
florinrelea