db.absences.insert([
{ \"_id\" : 1, \"student\" : \"Ann Aardvark\", sickdays: [ new Date (\"2018-05-01\"),new Date (\"2018-08-23\") ] },
In $lookup you could just join the collectionfirst and doing the match, project and etc later after lookup. And you should have the foreign field that referring to holidays collection.
Like :
{
$lookup:
{
from: "holidays",
localField: "holidaysID", //yourLocalfield, it is local field in absences. you should have it to join 2 collections
foreignField : "_id", //theforeignfield, it is _id in the holidays
as: "holidays"
}
},{ $match: { year: 2018 } },
{ $project: { _id: 0, date: { name: "$name", date: "$date" } } },
{ $replaceRoot: { newRoot: "$date" } }
Hope it helps.