Skip to content

Incorrect results for positional variable operator '#' on input arrays #382

@andrew-coleman

Description

@andrew-coleman

The # operator introduced in v1.7.0 is not working as designed for input JSON with top-level arrays. For example, the expression $#$pos[$pos < 3] is saying 'bind the variable $pos to the position (index) of each value in the input array, then filter the results to contain only those with index less than 3'. When applied to the input array [3,1,4,1,5,9], it should return [3,1,4]. However, in v1.7.0, it is returning nothing. This expression is equivalent to the expression $[[0..2]], which returns the correct [3,1,4].

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions