Content is machine translated from English by Phrase Language AI.

Arrays are a commonly used data structure in Orchestrator workflows and can be sourced from triggers or actions.

Arrays are a powerful tool in Orchestrator workflows, and understanding how to extract values from arrays is valuable. Whether working with triggers, actions, or variables, being able to reference specific values in arrays helps build more efficient and effective workflows.

Working with Arrays in Triggers

When using triggers, configure them by filtering on specific array values.

Assuming that the trigger has the following data:

  "locales": [
    {"name": "de"},
    {"name": "en"},
    {"name": "fr"}

If a trigger payload contains an array of locale names, create a trigger filter to only trigger the workflow when the first locale name is de. To achieve this, use the String Equals comparator and enter {{ $.data.locales.0.name }} for the value. The index in the array is separated by dots.

Working with Arrays in Actions

If an action returns an array and requires the dynamic use a specific value from that array in the next action, reference the value using the appropriate index.

As an example, an action returns the same data as in the trigger example. To extract the first locale name from the array, enter {{ $.locales[0].name }}. The index in the array is separated by square brackets. There is also no data in the path.

Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.