collect
Purpose
Uses the Groovy JDKcollect
method to iterate over each element of the specified object transforming the result using the expression in the closureExamples
Books titles: <g:collect in="${books}" expr="it.title"> <p>Title: ${it}</p> </g:collect>
Description
Attributesin
- The object to iterative overexpr
- A GPath expression