Field Names with Periods and Dollar Signs
On this page
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoDB server.
MongoDB supports field names that are dollar ($
) prefixed or that
contain periods (.
).
In most cases data that has been stored using field names like these
is not directly accessible. You need to use helper methods like
$getField
, $setField
, and
$literal
in queries that access those fields.
The field name validation rules are not the same for all types of storage operations.
Get Started
For examples of how to handle field names that contain periods and dollar signs, see these pages: