content_image/853531.jpg
<img src='content_image/853531.jpg'>

## Expressions 

Expressions can include field paths and system variables (page 470), literals (page 471), expression objects (page 471), and expression operators (page 471). Expressions can be nested. 

## Field Path and System Variables 

Aggregation expressions use field path to access fields in the input documents. To specify a field path, use a string that prefixes with a dollar sign $ the field name or the dotted field name, if the field is in embedded document. For example, "$user" to specify the field path for the user field or "$user.name" to specify the field path to "user.name" field. 

"$<field>" is equivalent to "$$CURRENT.<field>" where the CURRENT (page 479) is a system variable that defaults to the root of the current object in the most stages, unless stated otherwise in specific stages. CURRENT (page 479) can be rebound. 

Along with the CURRENT (page 479) system variable, other system variables (page 478) are also available for use in expressions. To use user-defined variables, use $let and $map expressions. To access variables in expressions, use a string that prefixes the variable name with $$ . 

