Collapse

Collapse a list of objects into a single object by merging each object in the order they appear in the list. If objects have overlapping keys subsequent values will take precedence over preceding values.

Examples:

Input list

Output object

[{“item”:1},{“item”:2}] {“item”:2}
[{“valueA”:“a”},{“valueB”:“b”}] {“valueA”:“a”,“valueB”:“b”}

Input Fields

  • list (required) - the list of objects that you want to collapse

Output Fields

  • output - the collapsed object

See Also

Functions in Workflows

About the elements of Okta Workflows