Record functions
Reference documentation for Expressif functions in the record scope.
| Name | Overview |
|---|---|
drop-null-fields | Removes null-valued fields from the input record without traversing nested records or collections. |
exclude-fields | Returns all fields except those whose names appear in the supplied array, preserving input field order and ignoring unknown names. |
expand | Flattens a selected nested record into its parent, qualifying conflicts or every expanded field when a label is supplied. |
explode | Emits one record per element of a selected collection-valued field, preserving other fields and field order. |
explode-outer | Emits one record per selected collection element, preserving parents with empty or null fields. |
field | Returns the value of the named field from the input record or object. Returns null when the field does not exist or the input does not expose named values. |
field-names | Returns the names of all fields in the input record, preserving field order. |
from-pairs | Converts an array of pairs to a record, coercing keys to text and preserving values and order. |
implode-inner | Groups records by all non-selected fields and collects non-null selected values in source order. |
nested-field | Returns the value at a nested field path in the input record or object, or null when the path cannot be resolved. |
pairs | Converts all record fields to pairs, preserving field names, values, and order. |
public | Returns a new record without fields whose names start with an underscore, preserving public field order and values. Unlike set-public and set-private, this function removes fields rather than renaming them. |
put | Creates or replaces statically named fields while preserving every other field. Assignment expressions are evaluated against the original input record. |
put-absent | Assigns statically named fields only when they are absent; a present field containing null remains unchanged. |
put-absent-path | Assigns the field at a dynamic path only when the final segment is absent, creating missing intermediate records. |
put-path | Creates or replaces the field at a dynamic path. Text is one literal segment; a tuple supplies nested segments, creating missing intermediate records. |
put-present | Assigns statically named fields only when they are present, including fields whose value is null. |
put-present-path | Assigns the field at a dynamic path only when the final segment is present, including when its value is null. |
record | Creates a record by evaluating its named and spread entries against the input value. Later entries overwrite fields with the same name created by earlier entries. |
rename-fields | Transforms selected field names while preserving field values and order. Duplicate resulting names cause an evaluation error. |
select-fields | Returns only fields whose names appear in the supplied array, preserving input field order and ignoring unknown names. |
set-private | Returns a new record by renaming selected public fields by adding a leading underscore, preserving field order and values. Omitting names converts all applicable fields. Existing destination names cause an evaluation error. Unlike public, this function does not remove fields. |
set-public | Returns a new record by renaming selected private fields by removing one leading underscore, preserving field order and values. Omitting names converts all applicable fields. Existing destination names cause an evaluation error. Unlike public, this function does not remove fields. |
with | Evaluates named projections independently against the input, then evaluates a body expression against their temporary record. |