Answers for "how to get data of another table in mongodb"

0

how to get data of another table in mongodb

Comments.aggregate([
    {$match: {postId : postId}},
    {$lookup:{
        from: 'commentLikes',
        localField: '_id',
        foreignField: 'commentId',
        as : 'likes'
    }}
    ])
.exec()
Posted by: Guest on June-24-2021

Code answers related to "how to get data of another table in mongodb"

Browse Popular Code Answers by Language