Get comment test not working

the syntax of $lookup seems changed in the document compared to the one instructor told to do .
although i have used both the syntax with appropiate parameters the test not working at all .please help

new syntax
{
$lookup:
{
from: ,
localField: ,
foreignField: <field from the documents of the “from” collection>,
as:
}
}

Please share the pipeline you are using in the code.

Kanika

hey @Kanika
here is my pipeline with test error

Hi @Prashant_Rawal_71220,

Please try using $sort in lookup stage using pipeline as we need to sort comments and not movie documents.

Here is the documentation link: https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/index.html#join-conditions-and-uncorrelated-sub-queries

Kanika

When I try and use $sort in the $lookup stage it gives me the error ‘Something went wrong in getMovieByID: MongoError: A pipeline stage specification object must contain exactly one field.’
How can we use pipeline in the lookup stage?

https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/

Look near New in version 3.6.