Hierarchy

  • ReplaceOne

Properties

Properties

$replaceOne: {
    find: StringExpression<string>;
    input: StringExpression<string>;
    replacement: StringExpression<string>;
}

Replaces the first instance of a matched string in a given input.

Type declaration

  • find: StringExpression<string>

    The string to search for within the given input. Can be any valid expression that resolves to a string or a null. If find refers to a field that is missing, $replaceOne returns null.

  • input: StringExpression<string>

    The string on which you wish to apply the find. Can be any valid expression that resolves to a string or a null. If input refers to a field that is missing, $replaceOne returns null.

  • replacement: StringExpression<string>

    The string to use to replace the first matched instance of find in input. Can be any valid expression that resolves to a string or a null.

Generated using TypeDoc