Skip to content

Issue with filters and projections #35

Description

@springcomp

Most implementations seem to have the following issue:

Given the following JSON:

[
  {
    "stack": "",
    "branch": [
      "one/",
      "two/"
    ]
  },
  { "branch": ["three/", "four/"]}
]

The following expression yields an incorrect result:

  • [?stack==''].branch[?starts_with(@, 'one')] -> invalid-type

In contrast, the following similar expression returns the expected result:

  • [].branch[?starts_with(@, 'one')] -> [ [ "one/" ], [] ]

Please consider adding a compliance test and fixing the libraries.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions