Okta Workflows Tips #65: Update a JSON Object Using the Object-Set card

Okta Workflows Tips are short and handy Okta Workflows tips and tricks. Read all the earlier tips.

Update a JSON object with the Set card

This flow updates a JSON object two times.

Update a JSON object with the Set card.
Update a JSON object with the Set card.

The JSON-Parse card creates this object:

{
  "First name": "Jane",
  "Last name": "Green",
  "Email": "jane@company.com"
}

The Object-Set card looks for the Email key. Since the key is in the object, the card updates its value:

The new JSON is:

{
  "First name": "Jane",
  "Last name": "Green",
  "Email": "jane.green@company.com"
}

The second Object-Set card looks for the Title key. Since the Title key is not in the object, the card adds the key/value to the object.

The new JSON object:

{
  "First name": "Jane",
  "Last name": "Green",
  "Email": "jane.green@company.com",
  "Title": "Automation Builder"
}

Okta Workflows resources

πŸš€ New to Okta Workflows? The Getting Started with Okta Workflows page has all the resources to help you get started.

πŸ“Ί Like learning from videos? Watch Okta Workflows videos.

❓Have a question? Ask during community office hours, post on the community forum, or email me.

πŸ™‹πŸ»β€β™€οΈ Want to learn from the community? Join the #okta-workflows channel on the Mac Admins Slack.

πŸ“– Want to learn more about Okta and automation? Take the Okta Workflows training on Okta Learning.

Leave a comment