Union with filter

Setup

Selector: $[?(@.key<3),?(@.key>6)]

[{"key": 1}, {"key": 8}, {"key": 3}, {"key": 10}, {"key": 7}, {"key": 2}, {"key": 6}, {"key": 4}]

Results

Other responses

Bash (JSONPath.sh)

[]

C (json-glib)

Not supported

Unable to compile selector `$[?(@.key<3),?(@.key>6)]': Invalid array index definition “?(@.key<3),?(@.key>6)]”

Clojure (json-path) ¹

[
  {
    "key": 1
  },
  {
    "key": 2
  }
]

Cpp (jsoncons)

[
  {
    "key": 1
  },
  {
    "key": 2
  },
  {
    "key": 8
  },
  {
    "key": 10
  },
  {
    "key": 7
  }
]

Dart (json_path)

[
  {
    "key": 1
  },
  {
    "key": 2
  },
  {
    "key": 8
  },
  {
    "key": 10
  },
  {
    "key": 7
  }
]

Elixir (ExJsonPath)

[
  {
    "key": 1
  },
  {
    "key": 2
  },
  {
    "key": 8
  },
  {
    "key": 10
  },
  {
    "key": 7
  }
]

Elixir (jaxon)

[]

Elixir (warpath) ¹

Not supported

Parser error: Invalid token on line 1, syntax error before: <<",">>

Erlang (ejsonpath)

Not supported

syntax error before: ','

Golang (github.com-PaesslerAG-jsonpath) ¹

Not supported

parsing error: $[?(@.key<3),?(@.key>6)]	:1:10 - 1:11 unexpected "<" while scanning parentheses expected ")"

Golang (github.com-ohler55-ojg)

Not supported

Golang (github.com-oliveagle-jsonpath) ¹

[]

Golang (github.com-vmware-labs-yaml-jsonpath)

Not supported

invalid filter expression at position 12, following ")"

Haskell (jsonpath)

Not supported

Invalid JSONPath: $[?(@.key<3),?(@.key>6)]
 Error: 1:13:
  |
1 | $[?(@.key<3),?(@.key>6)]
  |             ^^
unexpected ",?"
expecting "&&", "||", ']', or white space

JavaScript (brunerd)

[
  {
    "key": 1
  },
  {
    "key": 2
  },
  {
    "key": 8
  },
  {
    "key": 10
  },
  {
    "key": 7
  }
]

JavaScript (jsonpathly)

Not supported

mismatched input ',' expecting ']'

Java (com.github.jsurfer)

Not supported

org.antlr.v4.runtime.misc.ParseCancellationException

Java (com.jayway.jsonpath) ¹ ³

Not supported

SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
com.jayway.jsonpath.InvalidPathException: Could not parse token starting at position 1. Expected ?, ', 0-9, * 

Kotlin (com.nfeld.jsonpathkt) ¹

Not supported

Unexpected char, char=?, index=2

Objective-C (SMJJSONPath) ¹ ³

Not supported

Could not parse token starting at position 1 . Expected ?, ', 0-9, * 

PHP (galbar-jsonpath)

Not supported

Invalid JSONPath error: 'Error in JSONPath near '<3),?(@.key''

PHP (remorhaz-jsonpath)

Not supported

Error: 'Failed to build AST from JSONPath query: $[?(@.key<3),?(@.key>6)]'

PHP (softcreatr-jsonpath)

[
  {
    "key": 1
  },
  {
    "key": 3
  },
  {
    "key": 10
  },
  {
    "key": 2
  }
]

Python (jsonpath) ²

Not found

jsonpath returned false, this might indicate an error

Python (jsonpath-ng)

Not supported

JsonPathLexerError('Error on line 1, col 2: Unexpected character: ? ')

Python (jsonpath-rw)

Not supported

JsonPathLexerError('Error on line 1, col 2: Unexpected character: ? ')

Python (jsonpath2)

[]

Python (python-jsonpath)

Not supported

JSONPathSyntaxError("unbalanced ')'")

Raku (JSON-Path)

Not supported

JSON path parse error at position 1

Ruby (jsonpath)

[
  {
    "key": 1
  },
  {
    "key": 2
  },
  {
    "key": 8
  },
  {
    "key": 10
  },
  {
    "key": 7
  }
]

Rust (jsonpath)

Not supported

parsing error

Rust (jsonpath_lib)

Not supported

path error: 
$[?(@.key<3),?(@.key>6)]
^^^^^^^^^^^^^

Rust (jsonpath_plus)

[
  {
    "key": 1
  },
  {
    "key": 2
  },
  {
    "key": 8
  },
  {
    "key": 10
  },
  {
    "key": 7
  }
]

Rust (serde_json_path)

[
  {
    "key": 1
  },
  {
    "key": 2
  },
  {
    "key": 8
  },
  {
    "key": 10
  },
  {
    "key": 7
  }
]

Scala (jsonpath)

Not supported

JPError(end of input expected)

Swift (Sextant)

Not supported

NOT_SUPPORTED

dotNET (Json.NET)

Not supported

Unexpected character while parsing path indexer: ,

dotNET (JsonCons.JsonPath)

[
  {
    "key": 1
  },
  {
    "key": 2
  },
  {
    "key": 8
  },
  {
    "key": 10
  },
  {
    "key": 7
  }
]

dotNET (JsonPath.Net)

[
  {
    "key": 1
  },
  {
    "key": 2
  },
  {
    "key": 8
  },
  {
    "key": 10
  },
  {
    "key": 7
  }
]

dotNET (Manatee.Json)

Not supported

Unrecognized JSON Path Expression element. Path up to error: '$'

Errors

Golang (github.com-bhmj-jsonslice) ¹ ³

path: invalid character at 12

Golang (github.com-spyzhov-ajson)

wrong request: wrong request: ?(@.key<3),?(@.key>6)

JavaScript (Goessner) ²

jsonPath: Unexpected token ): _v.key<3),?(_v.key>6

JavaScript (jsonpath)

Line 1: Unexpected token )

JavaScript (jsonpath-plus)

Unexpected token ')'

PHP (Goessner) ²

ArgumentCountError

Perl (JSON-Path)

non-safe evaluation, died at main.pl line 11.

dotNET (JsonPathLib)

Line 1: Unexpected token )

Footnotes