each()
Usage
each(collection, eachExpression)
Description
Executes the given expression for each element in the given collection. The individual objects of the collection are passed into the filter expression sequentially, using the data key data
. This method returns no content.
Note: If you are using JavaScript you should use JavaScripts own Array.prototype.forEach()
instead.
Note: The collection can also be a String[]
property but you need to use this construct:
${each(get(first(find('TestType')), 'stringArrayProp'), print(data))}
Example
${each(find('User'), print(data.name))}
results in
adminuser1user2user3