Invalid property on computing fileds lab

I´m trying to resolve the third lab of M121 Lab 3 and I tried with the next:

db.movies.aggregate([ {
$project: {
“_id”: 0,
title:{
$size:{ $split: [ “$title”, " " ]}
},
{$match:{ title:{$eq:1} } }
}
}]).itcount()

also tried with:

db.movies.aggregate([ {
$project: {
“_id”: 0,
title:{
$size:{ $split: [ “$title”, " " ]}
},
{$match:{ title:1} }
}
}]).itcount()

but I´m getting this error in both cases:
E QUERY [js] SyntaxError: inavlid property id @(shell): 7:0

Does anyone know why?

In both cases the $match is inside $project document but should be in the array.

Your $project stage included the $match stage, but they are different stages and cannot be included with each other.

Yours:
db.movies.aggregate([
{$project: …
{$match: … }
}
]).itcount()

Correct:
db.movies.aggregate([
{$project: … },
{$match: … }
]).itcount()

Hope it helps.