Flatten

Takes a list that contains lists and turns it into a single list.

Examples:

Input lists

Output lists

[[1,2,3],[4,5,6],[7,8,9]] [1,2,3,4,5,6,7,8,9]
["one", ["two", ["three", "four"], "five"], "six"] ["one","two","three","four","five","six"]

A list of lists is not a type you normally would create, but it may be the case that you get it from a call to another application or API.

Input Fields

  • lists (required) - the list of lists that you want to flatten

Output Fields

  • list - the flattened list. Be sure to properly set the type of list you expect. For instance, in the first example above, you'd set the output list to be a list of numbers. In the second example, it would be a list of text.

See Also

About lists

Functions

About the elements of Okta Workflows