2019 Lab 2.4: Queries on Array Fields, Part 1

Problem:
Explore the movieDetails collection that you loaded into your Atlas sandbox cluster and then issue a query to answer the following question. How many movies in the movieDetails collection list “Family” among its genres?

Query is db.movieDetails.find({“genres”: [“Family”]}).count()
result is 8
But there is no such option, only 20, 57, 124, 200 and 277. ;-}

Oops! Sorry!
The right Query is db.movieDetails.find({“genres”: “Family”}).count()
result is 124

1 Like