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
from: ,
localField: ,
foreignField: <field from the documents of the “from” collection>,

Please share the pipeline you are using in the code.


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:


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?

Look near New in version 3.6.