Okta Workflows Tips #95: Three Ways to Extract a Value from an Object

Short and handy Okta Workflows tips and tricks. Read the full series.

When you process a list of records (users, groups, applications, or any other type), you send it to a helper flow. Inside the helper flow, you will likely extract keys from a JSON object.

The following flow shows processing user groups:

Get user groups.
Get user groups.

The helper flow shows three different ways to extract two keys (ID, Name):

Extract keys from a JSON object.
Extract keys from a JSON object.
  1. Two Object-Get cards, each pulling a single value from Record using its path (ID, and Profile.Name)
  2. One Object-Get Multiple card, pulling both values in a single card using the same two paths
  3. The Assign card, extracting ID and Profile.Name directly from Record by wiring the nested keys in as inputs, with no Get or Get Multiple cards at all

Whether you use one Get card per value, one Get Multiple for both, or just wire the keys directly, you end up with the identical ID and Name values — they’re just three different ways of doing the same extraction.

Running the flow:

Flow execution showing three ways to extract value from a JSON object.
Flow execution showing three ways to extract a value from a JSON object.

For more on working with JSON in Okta Workflows, see the Workflows Collection: Working with JSON.


Okta Workflows resources

Leave a Reply

Discover more from Max Katz

Subscribe now to keep reading and get access to the full archive.

Continue reading