Legacy Documentation
You're viewing legacy documentation for API Fortress (deployed via an on-premises container).
To view documentation for the new SaaS version of API Fortress — now known as Sauce Labs API Testing and Monitoring (with Sauce Connect tunnels) — see
API Testing on the Sauce Labs Cloud.
Allows you to iterate over a collection of elements and execute the piece of code for each element.
Parameters:
Name |
Type/Value |
Required |
Expression |
Expression |
Yes |
Expression: The path of the collection you want to iterate on. See
Expression for more details.

for each ‘legs’ collection checks if ‘vector’ item is an integer value.
If a collection is nested in another one, you need to refer to them as _1, _2, and so on.

for each payload.content.flights collection checks if ‘price.amount’ is an integer and then, for each legs array (that is a nested collection in the flights collection) checks if vector item is an integer value.