Union with keys after recursive descent

Setup

Selector: $..['c','d']

[{"c":"cc1","d":"dd1","e":"ee1"}, {"c": "cc2", "child": {"d": "dd2"}}, {"c": "cc3"}, {"d": "dd4"}, {"child": {"c": "cc5"}}]

Results

Consensus

[
  "cc1",
  "cc2",
  "cc3",
  "cc5",
  "dd1",
  "dd2",
  "dd4"
]

Other responses

C (json-glib)

Not supported

Unable to compile selector `$..['c','d']': Missing member name or wildcard after . character

Elixir (ExJsonPath)

Not supported

syntax error before: '['

Elixir (jaxon)

[]

Elixir (warpath) ¹

Not supported

Parser error: Invalid token on line 1, syntax error before: <<",">>

Erlang (ejsonpath)

Not supported

syntax error before: '['

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

[
  "cc1",
  "cc2"
]

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

Not supported

child name or array access or filter missing after recursive descent at position 3, following "$.."

JavaScript (jsonpath-plus)

[]

Java (com.jayway.jsonpath) ¹ ³

[
  {
    "c": "cc1",
    "d": "dd1"
  }
]

Objective-C (SMJJSONPath) ¹ ³

[
  {
    "c": "cc1",
    "d": "dd1"
  }
]

PHP (galbar-jsonpath) ²

Not supported

Invalid JSONPath error: 'Error in JSONPath near '..['c','d']''

Perl (JSON-Path)

[]

Python (jsonpath2)

Not supported

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

Raku (JSON-Path)

Not supported

JSON path parse error at position 3

Rust (jsonpath)

Not supported

parsing error

Rust (jsonpath_lib)

[]

Scala (jsonpath)

Not supported

JPError(end of input expected)

dotNET (Manatee.Json)

Not supported

Expected close bracket. Path up to error: '$..'''

JSON (Path_Reference_Implementation)

Not supported

 --> 1:3
  |
1 | $..['c','d']
  |   ^---
  |
  = expected childName

Errors

Clojure (json-path) ¹

java.lang.NumberFormatException For input string: "c"

Golang (github.com-oliveagle-jsonpath) ¹

strconv.Atoi: parsing "'c'": invalid syntax

PHP (softcreatr-jsonpath)

TypeError

Footnotes