Find the first occurrence of a value in an array.

 

Properties

  • target: Location of an array that you are iterating over
  • condition: Condition to match against

Output

  • output-location: The location for the found value to be saved

 

For examples

 

Let’s say we want to iterate over an array and find the first occurrence of “a”

 

1. Using the Testing feature, let’s send an array of [“a”, “b”, “c”] in the request body

2. Add an Iteration Find Action and assign where you want to read the array from (target), where you want to put the resulting value (target), and condition to match again. In this case string/contains value “a”

Below we see that the values in the array have been capitalized

0 0 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments