Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

lookup mongodb

let videos= await Beg.aggregate([
        {
          $project: {
            _id: 1,
          },
        },
        {
          $lookup: {
            from: "videos",
            localField: "_id",
            foreignField: "begId",
            as: "videos",
          },
        },
      ]);
 
PREVIOUS NEXT
Tagged: #lookup #mongodb
ADD COMMENT
Topic
Name
2+4 =