# Arrays and Nested Fields

Arrays and Nested Fields: Fields Inside Fields: Dot Notation, Querying Arrays: One Value, $all and $size, Arrays of Documents and $elemMatch.

Updated: November 19, 2026

1. [Fields Inside Fields: Dot Notation](https://www.ask-codey.com/lessons/mongodb-dot-notation) (Apprentice): Dot notation names a field inside an embedded document, such as "nutrition.calories" in quotes, so a filter can test that one field instead of matching the whole embedded document.
2. [Querying Arrays: One Value, $all and $size](https://www.ask-codey.com/lessons/mongodb-querying-arrays) (Apprentice): A filter on an array field matches when any item fits, $in matches when any item is one of a list, $all asks for every value in a list, and $size counts the items; an exact array match is rarely what you want.
3. [Arrays of Documents and $elemMatch](https://www.ask-codey.com/lessons/mongodb-arrays-of-documents-and-elemmatch) (Journeyman): Dot notation reaches a field of every document in an array, such as "ingredients.name"; two such conditions can be met by two different items, and $elemMatch makes them hold for the same item.

Source: https://www.ask-codey.com/courses/mongodb-in-depth/topics/mongodb-arrays-and-nested-fields
