I need to filter a list and transform the payload. Using Elasticsearch 5.6
Example(Groovy)
def list = [1,2,3,4,5]
def result = list.findAll { it > 2 }
The result would be [3,4,5]
This is showing syntax exception in my watcher.
Need a painless syntax to achieve above functionality