airBNB listingsAndReviews questions

can someone tell me why the code below returns “Unsupported projection option: reviews: { $size: 50.0 }”.

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

Question: Find dataset accommodate more than 6 people and has exactly 50 reviews?

Hi @Brett_Larson, it looks like you have an extra curly bracket after the $gt expression.

1 Like

Hi @Brett_Larson ,

I hope you found @yulia_genkina’s response helpful. Let us know if you are still facing any issues.

~ Shubham

Note that this question can be solved without the lecture’s new concepts since there is also the “number_of_reviews” field that can be compared directly, without the $size operator.