First, please provide closure on your other thread at db.colectionName1.aggregate([ { $match: { "filed1": { $in: ["x", "y"] }, } }, { $lookup: { from: "colectionName2", localField: "_id", foreignField: "xy", as: "matchedDate" } }, { $match: { - #2 by steevej
For the conversion you need https://www.mongodb.com/docs/manual/reference/operator/aggregation/convert/.