db.absences.insert([
{ \"_id\" : 1, \"student\" : \"Ann Aardvark\", sickdays: [ new Date (\"2018-05-01\"),new Date (\"2018-08-23\") ] },
Because you are trying to use the $lookup features (syntax) from MongoDB v3.6 on MongoDB v3.4
The MongoDB v3.4 $lookup syntax:
{
$lookup:
{
from: ,
localField: ,
foreignField: ,
as:
The MongoDB v3.6 $lookup syntax:
{
$lookup:
{
from: ,
let: { : , …, : },
pipeline: [ ],
as:
https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/