MongoDB โ€” Querying Nested & Embedded Documents

๐Ÿƒ MongoDB 7.0+ ๐ŸŸข Chapter 17 of 50 ๐Ÿ“‚ Phase 04: Advanced Querying, Array & Embedded Documents ๐Ÿ“… 2026 Edition

Master Dot Notation syntax to query nested fields inside sub-documents and arrays of sub-documents.

1Dot Notation Syntax Rules

To query fields nested inside embedded sub-documents, use Dot Notation. In MongoDB, dot notation paths MUST be enclosed in quotes ("address.city"):

Dot Notation Example
// Query embedded field
db.users.find({ "address.city": "Hyderabad" });

// Query array of sub-documents
db.orders.find({ "items.productName": "Wireless Mouse" });
OC
Written by Our Compiler Technical Editorial Team
Reviewed for accuracy & tested on MongoDB 7.0+ Standards ยท Last updated August 2026