MongoDB Mongoose Use Lookup Guide
In This Blog We Will See Complete Guide For Using Joins With Lookup in Mongoose MongoDB Mongoose - Education Funda Simply in MongoDB Mongoose we can use Aggregate Query with $ lookup to get data basis upon JOINS. such as below: await MainModel . aggregate ([ { $match : { "COLUMN_NAME" : value } }, { $lookup : { from : 'relation_collection_name' , localField : 'relation_collection_primary_key' , foreignField : 'this_table_foreign_key' , as : 'ALIASING' } } ]); With above query new column added with ALIASING in which relation collection data will also come. To get data in Object format instead of Array we can use $unwind like below: await MainModel . aggregate ([ { $match : { "COLUMN_NAME" : value } }, { $lookup : { from : 'relation_collection_name' , ...