Skip to content

JSONPath filter with recursive descent - the filter process elements twice #968

Closed

Description

@LiorKogan

RedisJSON 2.4.6

Given

JSON.SET arr $ "[1,2,3]"
JSON.GET arr '$..[?@>=1]'
[1,2,3,1,2,3]

Other examples:

JSON.SET obj $ '{"a":[1,2,3,["b",4],{"c":5},{"d":null}], "e":6}'
JSON.GET obj '$..[?@==@]'
[[1,2,3,["b",4],{"c":5},{"d":null}],6,1,2,3,["b",4],{"c":5},{"d":null},1,2,3,"b",4,"b",4,5,5,null,null,6]

Each of the elements 1,2,3,"b",4,5,null,6 is processed twice against the filter.

JSON.GET obj '$..[?@>=1]'
[6,1,2,3,1,2,3,4,4,5,5,6]

Activity

  1. changed the title [-]JSONPath filter with recursive descent - the filter process elements more than once[/-] [+]JSONPath filter with recursive descent - the filter process elements twice[/+] on Apr 19, 2023
  2. AvivDavid23 commented on Apr 13, 2026

    @AvivDavid23
    Contributor

    fixed with #1542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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