Hierarchy

  • GetField

Properties

Properties

$getField: {
    field: StringExpression<string>;
    input?: string | ArrayElemAt | First | Last | Reduce | Literal | Function | MergeObjects | SetField | UnsetField | DateToParts | RegexFind;
}

Returns the value of a specified field from a document. If you don't specify an object, $getField returns the value of the field from $$CURRENT.

Type declaration

  • field: StringExpression<string>

    Field in the input object for which you want to return a value. field can be any valid expression that resolves to a string constant.

  • Optional input?: string | ArrayElemAt | First | Last | Reduce | Literal | Function | MergeObjects | SetField | UnsetField | DateToParts | RegexFind

    A valid expression that contains the field for which you want to return a value. input must resolve to an object, missing, null, or undefined. If omitted, defaults to the document currently being processed in the pipeline ($$CURRENT).

Generated using TypeDoc