Mongodb Aggregation :- Get specific fields from $lookup nested array
I am trying to get specific fields from the array I got after aggregate, lookup and some cond Below you can see my query const attendanceData = await User.aggregate([ { $match: { lastLocationId: Mongoose.Types.ObjectId(typeId), isActive: true, }, }, { $project:…