method

Value.WithMembers

WithMembers returns an object with members added or replaced, sharing the other immutable members with the original. It copies the object's map once, where CopyObject followed by Object would copy it twice. It returns the original value and false for a non-object value. Existing values and retained snapshots are never mutated.

Arguments

ArgumentTypeDescription
membersValuesThe members value.

Returns

The declared result.

(Value, bool)

Full signature

Related types

  • Value

    An immutable scalar, object, list, or populated document value.

  • Values

    A map of field names to typed values.