Array slice with negative step only

Setup

Selector: $[::-2]

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

Results

Consensus

[
  "fifth",
  "third",
  "first"
]

Other responses

Bash (JSONPath.sh)

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

C (json-glib)

[]

Clojure (json-path) ¹

"forth"

Elixir (jaxon)

[]

Erlang (ejsonpath)

Not supported

syntax error before: ':'

FSharp (FSharp.Data.JsonPath)

[]

JavaScript (Goessner) ²

Not found

jsonpath returned false, this might indicate an error

JavaScript (jsonpath-plus)

[]

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: Failed to parse SliceOperation: ::-2

Kotlin (com.nfeld.jsonpathkt) ¹

[
  "first",
  "second",
  "third"
]

Objective-C (SMJJSONPath) ¹ ³

Not supported

Failed to parse SliceOperation: ::-2

Perl (JSON-Path)

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

Python (jsonpath) ²

Not found

jsonpath returned false, this might indicate an error

Python (jsonpath-rw)

Not supported

Exception('Parse error at 1:3 near token : (:)')

Python (jsonpath2)

[]

Raku (JSON-Path)

Not supported

JSON path parse error at position 1

Rust (jsonpath)

Not supported

parsing error

Rust (jsonpath_lib)

Not supported

path error: 
$[::-2]
^^^^

Swift (Sextant)

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

dotNET (JsonPathLib)

[]

dotNET (Manatee.Json)

[]

Errors

Elixir (ExJsonPath)

FunctionClauseError

Golang (github.com-oliveagle-jsonpath) ¹

only support one range(from, to): [  -2]

PHP (Goessner) ²

timeout: sending signal TERM to command ‘implementations/PHP_Goessner/run.sh’

Ruby (jsonpath)

step can't be negative

Footnotes