unpivot_array
Aliases: array_unpivot (deprecated).
unpivot_array(object: object, keyFieldName: string, valueFieldName: string) -> array of object
unpivot_array expands one object value into an array of object rows: each top-level key produces a row whose keyFieldName field holds the key string and whose valueFieldName field holds the associated value (as variant when needed). This is the inverse of assembling key/value rows with pivot_array. The same implementation is still callable under the deprecated spelling array_unpivot.
Domain
This is a scalar function (calculates a single output value for a single input row).
Categories
Examples
make_col rows: unpivot_array(attrs, "name", "value")
Turns each key on object column attrs into its own row with name and value fields via unpivot_array.
Updated 18 days ago