Write Query: Nested Queries and Fields
Learn how to filter MongoDB documents using nested queries and multiple conditions.
We'll cover the following...
We'll cover the following...
Questions
Given the following sample documents from the products collection:
[
{
"_id": "a101a9c0c1f9472db1c01a11",
"name": "Laptop",
"category": "Computers",
"brand": "Zenbyte",
"price": 899,
"stock": 34,
"status": "Active",
"tags": ["portable", "work", "student"],
"rating": 4.7
},
{
"_id": "a102b8d1f2e0472db1c01a12",
"name": "Smartphone",
"category": "Mobile",
"brand": "Aurelia",
"price": 699,
"stock": 72,
"status": "Active",
"tags": ["android", "5g"],
"rating": 3.2
},
{
"_id": ...