Filter operator for arrays #1159
Labels
Feature
A change that introduces a new feature
PR Pending
A PR has been raised to resolve this issue
XPath
An issue related to XPath
I propose to provide
?[...]
as a filter operator for arrays.For example,
returns
[(4,5,6,7)]
I propose that the operator should work exactly like the familiar
[]
for sequences in its handling of numeric and boolean predicate values. So for example $array?[2,1] in the above example returns[(4,5,6,7), (1,2,3)]
. The result is always an array (which may be a little surprising). This means that$array?[3]
has the same effect as[$array?3]
or[$array(3)]
.The text was updated successfully, but these errors were encountered: