Question: Review Figure 10-5 (a). Write a MongoDB query to display all products with review ratings greater than 3 stars and suppress the fields height and
Review Figure 10-5 (a). Write a MongoDB query to display all products with review ratings greater than 3 stars and suppress the fields “height” and “width” in the output using the subset of fields text boxes.
{ "_id": "1", "name": "OLED TV", "desc": "75in TV", "width":60, "height": 30, "depth": 5, "reviews": [ { ] "author": 1, "ratingstars": 4, "comment": "Amazing TV" }, { "author": 2, "ratingstars": 2, "comment": "Very disappointed with the TV" }
Step by Step Solution
3.37 Rating (163 Votes )
There are 3 Steps involved in it
dbproductsfindreviews elemMatch ratingstars gt 3 height 0 width 0 Explanation The MongoDB qu... View full answer
Get step-by-step solutions from verified subject matter experts
