Map

Processes an object key-by-key using a helper flow, creating a new object as output.  For each key in the input object, the helper flow is called with the key name and value for that key - you can select those using the dropdown in the designer after selecting a helper flow from the Choose Flow dialog.

The helper flow must output two values, key and value, using a Return card.  Each key/value pair will form one key in the output object. The helper flow can also filter out some of the keys by using Continue If or similar logic - if the helper flow completes without returning a key/value pair, then that iteration will not contribute a key to the output object.

Input Fields

  • object (required): the object or list of objects you want to process

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

  • (dynamically generated):  the inputs defined by the helper flow

  • concurrency: how many keys to process in parallel

Output Fields

  • output: the new object formed by the key/value pairs from the helper flow

Example

Suppose you wanted to filter an object by removing all keys who have a value starting with the letter "t". You can do that with the following helper flow - it accepts key and value, gets the first letter of value, and if that letter is not "t" then it echoes back the same key and value.

That flow, when used with Map, will turn this object:

{ "this": "that", "up": "down", "left": "right", "one": "two" }

into this:

{ "up": "down", "left": "right" }

Related topics

Functions in Workflows

Elements of Workflows