Ticket: projection

Hello! I think i didn’t exactly get how to do this.

what am i doing wrong? Any advice?

You have 2 things named countries. One is a field of the collection and the other is a variable, the parameter. The latter is probably already an array. I know that js does not really care about the quotes but it is at least confusing for the reader. Is the first occurrence of countries in find() refers to a field named countries or to the variable countries. I do not know enough about js to know for sure, so I always put quotes on field names.

the first occurrence of countries is a field of the “movies” collection, the latter is an array passed as parameter to “getMoviesByCountry”

So if countries, the parameter, is an array. What is [ countries ]?

you’re right