Welcome to a different Okta Workflows Ideas submit. Learn all earlier suggestions.
On this submit:
- Making a JSON object
- Looking out a JSON object
- Lowering a listing to a single worth (the best way to use the Listing-Scale back card)
Making a JSON object
Right here is the best way to create a JSON object utilizing the Object-Assemble card:
Notice that discipline names had been renamed, and the result’s this JSON object:
Though it’s potential to make use of the Textual content-Compose card to create a JSON object, it is strongly recommended to make use of the Object-Assemble card. Utilizing the Assemble card is much less error-prone.
Looking out a JSON object
Because of Bryan Barrows (Workflows Product Specialist at Okta) for sharing this circulate.
This instance from Bryan exhibits the best way to search a JSON object.
You’ll be able to obtain the JSON file used on this instance.
The purpose is to seek out the Battery Situation worth.
That is how the circulate works:
- The primary card, the JSON-Parse card, creates the JSON object from a string. In your scenario, you may be getting the JSON from one other card resembling a search or API name
- The Listing-Filter card finds the objects the place the identify is ready to Battery Situation
- The Listing-Collapse card transforms a listing of objects right into a single object
- And at last, the Object-Get A number of card retrieves the worth property that holds that battery situation
Lowering a listing to a single worth (the best way to use the Listing-Scale back card)
This weblog submit has three examples of the best way to use the Listing-Scale back card.
The examples are:
- An inventory of numbers – sum all of the numbers
- An inventory of numbers – discover the biggest (or smallest) quantity
- An inventory of messages (textual content) – create a single message containing all of the messages from a listing
Learn the weblog submit.