Database

[{postId:"232323",post:"This is my first post",commentsOnPost:[{commentId:"232323_8888",comment:"Congrats",repliesOnPost:[{replyId:"232323_8888_66666",reply:"Thanks",likesOnReply:["user1","user5","user3"]}]}]}]

Query

db.collection.update({postId:"232323"},[{$set:{commentsOnPost:{$map:{input:"$commentsOnPost",in:{$cond:[{$eq:["$$this.commentId","232323_8888"]},{$mergeObjects:["$$this",{repliesOnPost:{$map:{input:"$$this.repliesOnPost",in:{$cond:[{$eq:["$$this.replyId","232323_8888_66666"]},{$mergeObjects:["$$this",{likesOnReply:{$cond:[{$in:["user2","$$this.likesOnReply"]},{$filter:{input:"$$this.likesOnReply",cond:{$ne:["$$this","user2"]}}},{$concatArrays:["$$this.likesOnReply",["user2"]]}]}}]},"$$this"]}}}}]},"$$this"]}}}}}])

Result