FEEL

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

ElementTypeDescription
conditionbooleanfilter test; item is the current element
indexnumber1-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
[1,2,3][1]
[1,2,3][-1]

Related constructs

list projection (path on a list) · for … in … return · range / interval

Related functions

count · sublist · sort

Defined by the OMG DMN 1.6 specification, chapter 10.3 (the FEEL grammar and semantics).