Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 540 Bytes

fact-dot-notation.rst

File metadata and controls

18 lines (12 loc) · 540 Bytes

MongoDB uses the dot notation to access the elements of an array and to access the fields of a subdocument.

To access an element of an array by the zero-based index position, concatenate the array name with the dot (.) and zero-based index position, and enclose in quotes:

'<array>.<index>'

To access a field of a subdocument with dot-notation, concatenate the subdocument name with the dot (.) and the field name, and enclose in quotes:

'<subdocument>.<field>'