Find the first occurrence of a value in an array.
- target: Location of an array that you are iterating over
- condition: Condition to match against
- output-location: The location for the found value to be saved
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