In the Ticket: Projection lab, the use of cursor.next() is not used, and the cursor.toArray() method is used to return the results of the movies.find().
So, I thought to to console.log(cursor.toArray()) from within the getMoviesByCountry, just after the find.movies is executed. However this error popped up.
With this piece of code
So I am intrigued as to the meaning of this message? Since my console.log(cursor) returns something, and I thought to look inside cursor at the data, that is being sent back, from within the function getMoviesByCountry.
Is toArray() doing more than just parsing an array?