Skip to content

Issue with filters and projections #35

@springcomp

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.

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