list filter […]
FEEL language construct
list[condition] · list[index]
Square brackets after a list either filter it or index into it. In a filter the implicit variable item refers to the current element, and the entries of a context element are directly in scope, so a filter can name the fields of the records it filters. A numeric index selects one element: FEEL is 1-based, and negative indexes count from the end.
Syntax elements
| Element | Type | Description |
|---|---|---|
| condition | boolean | filter test; item is the current element |
| index | number | 1-based position; negative counts from the end |
Examples
[1,2,3,4][item > 2]
[3, 4]
Try it ↑
[{name:"a",age:30},{name:"b",age:20}][age > 25].name
[a]
Try it ↑
[1,2,3][1]
1
Try it ↑
[1,2,3][-1]
3
Try it ↑
Related constructs
list projection (path on a list) · for … in … return · range / interval
Related functions
Defined by the OMG DMN 1.6 specification, chapter 10.3 (the FEEL grammar and semantics).