record →
put-present-path(
    path: expression,
    value: expression
) → record

Assigns the field at a dynamic path only when the final segment is present, including when its value is null.

Parameters

Name Type Required Description
path expression Yes An expression producing non-empty text for one literal segment or a non-empty tuple of non-empty text segments.
value expression Yes The expression producing the assigned value from the original input record.

Argument evaluation

  • path: Evaluated once against the value entering this call.
  • value: Evaluated against the original incoming record only if the target path is present.

Examples

{age := #null} | put-present-path("age", 42)  {age := 42}

Kind: Function
Scope: record
Aliases: None


This site uses Just the Docs, a documentation theme for Jekyll.