Homework Chapter 1

Hi,
I’m currently stuck while trying to run this code:
var pipeline = [{$match:{"imdb.rating": {$gt:7}},"genres": {"$nin":["Crime","Horror"]}, "rated":{"$in":["G","PG"]}, "languages": {"$all": ["English","Japanese"]}}] Then db.movies.aggregate(pipeline).itcount().
The error I get is while trying to get the number of documents using itcount() function:


(ignore the pipline0 variable at the top of the terminal, I was just trying to see if the problem was overwritting the pipline variable)

Solved it by removing the extra ending quote in

"imdb.rating": {$gt:7}} and moving it to the end of the query

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.