Filter expression with bracket notation with number on object

Setup

Selector: $[?(@[1]=='b')]

{"1": ["a", "b"], "2": ["x", "y"]}

Results

Other responses

Bash (JSONPath.sh)

[]

C (json-glib)

Not supported

Unable to compile selector `$[?(@[1]=='b')]': Invalid array index definition “?(@[1]=='b')]”

Clojure (json-path) ¹

[
  null,
  null
]

Cpp (jsoncons)

[
  [
    "a",
    "b"
  ]
]

Dart (json_path)

[
  [
    "a",
    "b"
  ]
]

Elixir (ExJsonPath)

[
  [
    "a",
    "b"
  ]
]

Elixir (jaxon)

[]

Elixir (warpath) ¹

[]

Erlang (ejsonpath)

[
  [
    "a",
    "b"
  ]
]

Golang (github.com-PaesslerAG-jsonpath) ¹

[
  [
    "a",
    "b"
  ]
]

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

[]

Golang (github.com-ohler55-ojg)

[
  [
    "a",
    "b"
  ]
]

Golang (github.com-spyzhov-ajson)

[
  [
    "a",
    "b"
  ]
]

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

[]

Haskell (jsonpath)

[
  [
    "a",
    "b"
  ]
]

JavaScript (Goessner) ²

Not found

jsonpath returned false, this might indicate an error

JavaScript (brunerd)

[]

JavaScript (jsonpath)

[
  [
    "a",
    "b"
  ]
]

JavaScript (jsonpath-plus)

[
  [
    "a",
    "b"
  ]
]

JavaScript (jsonpathly)

[]

Java (com.github.jsurfer)

[
  [
    "a",
    "b"
  ]
]

Java (com.jayway.jsonpath) ¹ ³

[]

Kotlin (com.nfeld.jsonpathkt) ¹

Not supported

Unexpected char, char=?, index=2

Objective-C (SMJJSONPath) ¹ ³

[]

PHP (galbar-jsonpath)

[
  [
    "a",
    "b"
  ]
]

PHP (remorhaz-jsonpath)

[]

PHP (softcreatr-jsonpath)

[
  [
    "a",
    "b"
  ]
]

Python (jsonpath) ²

[
  [
    "a",
    "b"
  ]
]

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)

Not supported

line 1:10 token recognition error at: '''
ValueError("line 1:10 token recognition error at: '''")

Python (python-jsonpath)

[
  [
    "a",
    "b"
  ]
]

Raku (JSON-Path)

Not supported

Evaluation of embedded Perl 6 code not allowed (construct with :allow-eval)

Rust (jsonpath)

[]

Rust (jsonpath_lib)

[
  "b"
]

Rust (jsonpath_plus)

[
  [
    "a",
    "b"
  ]
]

Rust (serde_json_path)

[
  [
    "a",
    "b"
  ]
]

Scala (jsonpath)

[]

Swift (Sextant)

[]

dotNET (Json.NET)

[]

dotNET (JsonCons.JsonPath)

[
  [
    "a",
    "b"
  ]
]

dotNET (JsonPath.Net)

[
  [
    "a",
    "b"
  ]
]

dotNET (JsonPathLib)

[
  [
    "a",
    "b"
  ]
]

dotNET (Manatee.Json)

[
  [
    "a",
    "b"
  ]
]

Errors

Golang (github.com-oliveagle-jsonpath) ¹

key error:  not found in object

PHP (Goessner) ²

ArgumentCountError

Perl (JSON-Path)

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

Ruby (jsonpath)

Node does not appear to be an array.

Footnotes