Filter expression with dot notation with number on array

Setup

Selector: $[?(@.2 == 'third')]

[["first", "second", "third", "forth", "fifth"]] 

Results

Other responses

Bash (JSONPath.sh)

[]

C (json-glib)

Not supported

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

Clojure (json-path) ¹

[
  [
    "first",
    "second",
    "third",
    "forth",
    "fifth"
  ]
]

Cpp (jsoncons)

[
  [
    "first",
    "second",
    "third",
    "forth",
    "fifth"
  ]
]

Dart (json_path)

Not supported

Instance of 'ParserException': end of input expected (at 1:2)

Elixir (ExJsonPath)

[
  [
    "first",
    "second",
    "third",
    "forth",
    "fifth"
  ]
]

Elixir (jaxon)

[]

Elixir (warpath) ¹

[]

Erlang (ejsonpath)

Not supported

syntax error before: 2

Golang (github.com-PaesslerAG-jsonpath) ¹

Not supported

parsing error: $[?(@.2 == 'third')]	:1:6 - 1:8 unexpected Float while scanning parentheses expected ")"

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

[
  [
    "first",
    "second",
    "third",
    "forth",
    "fifth"
  ]
]

Golang (github.com-ohler55-ojg)

[]

Golang (github.com-oliveagle-jsonpath) ¹

[]

Golang (github.com-spyzhov-ajson)

[
  [
    "first",
    "second",
    "third",
    "forth",
    "fifth"
  ]
]

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

[]

Haskell (jsonpath)

[]

JavaScript (brunerd)

Not supported

JavaScript (jsonpathly)

[
  [
    "first",
    "second",
    "third",
    "forth",
    "fifth"
  ]
]

Java (com.github.jsurfer)

[
  [
    "first",
    "second",
    "third",
    "forth",
    "fifth"
  ]
]

Java (com.jayway.jsonpath) ¹ ³

[]

Kotlin (com.nfeld.jsonpathkt) ¹

Not supported

Unexpected char, char=?, index=2

Objective-C (SMJJSONPath) ¹ ³

[]

PHP (galbar-jsonpath)

[
  [
    "first",
    "second",
    "third",
    "forth",
    "fifth"
  ]
]

PHP (remorhaz-jsonpath)

[]

PHP (softcreatr-jsonpath)

[
  [
    "first",
    "second",
    "third",
    "forth",
    "fifth"
  ]
]

Python (jsonpath) ²

[
  [
    "first",
    "second",
    "third",
    "forth",
    "fifth"
  ]
]

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:6 mismatched input '2' expecting {'*', ID}
ValueError("line 1:6 mismatched input '2' expecting {'*', ID}")

Python (python-jsonpath)

Not supported

JSONPathSyntaxError("expected ('FILTER_END', 'RBRACKET'), found 'INT'")

Raku (JSON-Path)

Not supported

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

Rust (jsonpath)

[]

Rust (jsonpath_lib)

[]

Rust (jsonpath_plus)

[]

Rust (serde_json_path)

Not supported

at position 6, in long-hand segment, must start with lowercase alpha or '_'

Scala (jsonpath)

[]

Swift (Sextant)

[]

dotNET (Json.NET)

[]

dotNET (JsonCons.JsonPath)

[]

dotNET (JsonPath.Net)

Not supported

Pattern '(@.2 == 't...' not recognized.

dotNET (Manatee.Json)

[]

Errors

JavaScript (Goessner) ²

jsonPath: Unexpected number: _v.2 == 'third'

JavaScript (jsonpath)

Line 1: Unexpected number

JavaScript (jsonpath-plus)

Unexpected number

PHP (Goessner) ²

ArgumentCountError

Perl (JSON-Path)

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

Ruby (jsonpath)

undefined method `2' for ["first", "second", "third", "forth", "fifth"]:Array

dotNET (JsonPathLib)

Line 1: Unexpected number

Footnotes