Lab - Computing Fields- missing { after property list

db.movies.aggregate([{$match: {$size: {$split: [โ€™$title" , " "]}: 1 }}]);

I fail to find out the reason for this query to be failing. Please guide!

Hey @payal_40246

Do you use a code editor like VScode to author the pipelines? This will help with bracket matching as that is what the error is.

And please review the document details for $match
Specifically this part

$match takes a document that specifies the query conditions. The query syntax is identical to the read operation query syntax; i.e. $match does not accept raw aggregation expressions.

1 Like