Map to List

Iterates through an object key-by-key using a child Flow, creating a list as output, with one item in the list per key in the object. For each key in the input object, the child Flow is called with the key name and value for that key - you can select those using the dropdown in the child Flow inputs after selecting a child Flow using the Choose Flow button.

The output of the child Flow should match whatever type is specified for new list. There will be one output list item for each key/value pair in the input object.

Input Fields

  • object (required): the object or list of objects you want to pick values from

  • flow (required): the child Flow to process each key/value pair

  • (dynamically generated):  the inputs defined by the child Flow

  • concurrency: how many keys to process in parallel

Output Fields

  • new list: the new list formed by the key/value pairs from the child Flow.


Suppose you wanted to convert an object into a list of objects, where each key/value pair is converted to an object that has "propertyname" and "propertyvalue" keys - this is a common pattern among cloud APIs.  Suppose the propertyname also needs to be prefixed with "custom:".  You can do that with the following child Flow - it accepts key, value, and a constant prefix (which is the same across all iterations - the parent Flow should pass this in), and returns back an object with 2 keys:

That Flow, when used with Map to List, will turn this object:

into this list:

See Also


About the elements of Okta Workflows