Filter expression with subpaths

Setup

Selector: $[?(@.address.city=='Berlin')]

[
  {
    "address": {
      "city": "Berlin"
    }
  },
  {
    "address": {
      "city": "London"
    }
  }
]

Results

Consensus

[
  {
    "address": {
      "city": "Berlin"
    }
  }
]

Other responses

Bash (JSONPath.sh)

[]

C (json-glib)

Not supported

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

Clojure (json-path) ¹

[]

Elixir (jaxon)

[]

Golang (github.com-PaesslerAG-jsonpath) ¹

Not supported

parsing error: $[?(@.address.city=='Berlin')]	:1:21 - 1:29 could not parse string: invalid syntax

Golang (github.com-oliveagle-jsonpath) ¹

[]

Kotlin (com.nfeld.jsonpathkt) ¹

Not supported

Unexpected char, char=?, index=2

PHP (softcreatr-jsonpath)

[]

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:20 token recognition error at: '''
ValueError("line 1:20 token recognition error at: '''")

Raku (JSON-Path)

Not supported

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

Rust (jsonpath)

[]

JSON (Path_Reference_Implementation)

Not supported

 --> 1:3
  |
1 | $[?(@.address.city=='Berlin')]
  |   ^---
  |
  = expected unionChild, unionArrayIndex, or sliceStart

Errors

PHP (Goessner) ²

ArgumentCountError

Perl (JSON-Path)

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

Footnotes