HELP! M001 Chapter 4 Lab 1: Array Operators

Hello,
New to MongoDB and programming in general:

I am struggling with the following Lab question from the intro course. I cannot get a result in the mongoshell IDE.
Chapter 4: Advanced CRUD Operations

Lab 1: Array Operators

What is the name of the listing in the sample_airbnb.listingsAndReviews dataset that accommodates more than 6 people and has exactly 50 reviews?

db.listingsAndReviews.find(…accommodates $gt 6, number_of_reviews $eq 50)

Any help on how to structure the array operators for this question is appreciated.

Solved. db.listingsAndReviews.find({ “reviews”: { “$size”:50 },
“accommodates”: { “$gt”:6 }})

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