How to use NOT IN array condition inside mongodb $lookup aggregate
问题 I have two collections: Users: { _id: ObjectId('5e11d2d8ad9c4b6e05e55b82'), name:"vijay" } Followers : { _id:ObjectId('5ed0c8faac47af698ab9f659'), user_id:ObjectId('5e11d2d8ad9c4b6e05e55b82'), following:[ ObjectId(5ee5ca5fac47af698ab9f666'), ObjectId('5df7c0a66243414ad2663088') ] created_at:"2020-05-29T08:34:02.959+00:00" } I need to list all users who are not in the following array from users table for a particular user, I've come up with the below by writing aggregate function in followers