Filter expression with equals string

Setup

Selector: $[?(@.key=="value")]

[
    {"key": "some"},
    {"key": "value"},
    {"key": null},
    {"key": 0},
    {"key": 1},
    {"key": -1},
    {"key": ""},
    {"key": {}},
    {"key": []},
    {"key": "valuemore"},
    {"key": "morevalue"},
    {"key": ["value"]},
    {"key": {"some": "value"}},
    {"key": {"key": "value"}},
    {"some": "value"}
]

Results

Consensus

[
  {
    "key": "value"
  }
]

Other responses

Bash (JSONPath.sh)

[
  "value"
]

C (json-glib)

Not supported

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

Clojure (json-path) ¹

[
  {
    "key": null
  },
  {
    "some": "value"
  }
]

Elixir (jaxon)

[]

Golang (github.com-oliveagle-jsonpath) ¹

[]

JavaScript (Goessner) ²

[
  {
    "key": "value"
  },
  {
    "key": [
      "value"
    ]
  }
]

JavaScript (jsonpath)

[
  {
    "key": "value"
  },
  {
    "key": [
      "value"
    ]
  }
]

JavaScript (jsonpath-plus)

[
  {
    "key": "value"
  },
  {
    "key": [
      "value"
    ]
  }
]

Java (com.github.jsurfer)

[
  {
    "key": "value"
  },
  {
    "key": {
      "key": "value"
    }
  }
]

Kotlin (com.nfeld.jsonpathkt) ¹

Not supported

Unexpected char, char=?, index=2

PHP (softcreatr-jsonpath)

[
  {
    "key": "value"
  },
  {
    "key": 0
  }
]

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 extraneous input '=' expecting {'@', '$', 'true', 'false', 'null', '{', '[', STRING, NUMBER}
ValueError("line 1:10 extraneous input '=' expecting {'@', '$', 'true', 'false', 'null', '{', '[', STRING, NUMBER}")

Raku (JSON-Path)

Not supported

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

Rust (jsonpath)

Not supported

parsing error

dotNET (Json.NET)

Not supported

Unexpected character while parsing path query: "

JSON (Path_Reference_Implementation)

Not supported

 --> 1:3
  |
1 | $[?(@.key=="value")]
  |   ^---
  |
  = expected unionChild, unionArrayIndex, or sliceStart

Errors

PHP (Goessner) ²

ArgumentCountError

Perl (JSON-Path)

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

Footnotes