You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

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

Search results for "each()"

each()

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.

each(collection, eachExpression)