ProjectStageOperators
The operators allowed in a $project
stage.
Functions
Refers to field as a nested field of the current value.
Refers to child as a nested field of the current field.
Selects a subset of an array to return based on the specified predicate, similarly to kotlin.collections.filter.
Refers to a specific item in an array, by its index.
Refers to a specific item in a map, by its name.
Applies a transform to all elements in an array and returns the array with the applied results, similar to kotlin.collections.map.
Refers to a Kotlin value within an aggregation value.
Refers to a BsonType within an aggregation value.
Refers to a field within an aggregation value.
Replaces the value of a field with the specified value.
Sorts an array based on its elements, in ascending order.
Sorts an array based on fields of its elements.
Sorts an array based on its elements, in descending order.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Writes the result of simplifying to a new Bson.
Writes the result of simplifying this expression into writer.