Wednesday, May 1, 2024
HomeJavaWorkflows Ideas #42: Making a JSON Object, Looking out a JSON Object,...

Workflows Ideas #42: Making a JSON Object, Looking out a JSON Object, and Utilizing the Listing-Scale back Card – Java Code Geeks


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:

Making a JSON object

Notice that discipline names had been renamed, and the result’s this JSON object:

Testing the Object-Assemble card

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.

Looking out 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:

  1. 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
  2. The Listing-Filter card finds the objects the place the identify is ready to Battery Situation
  3. The Listing-Collapse card transforms a listing of objects right into a single object
  4. And at last, the Object-Get A number of card retrieves the worth property that holds that battery situation
Looking out a JSON object consequence

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.

Lowering a listing to a single worth

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.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments