Problem with Projection

I am trying below mongo query and it is working for one element of an array, but not working for multiple elements.
the same query is working fine on the terminal.
cursor = await movies.find({countries:{$in:countries}},{title:1})

countries is an array of different countries…
Please help me…

It will be resolved if you use.

cursor = await movies.find({countries:{$in:countries}}).project({ title: 1 })