Filter expression with in array of values

Setup

Selector: $[?(@.d in [2, 3])]

[{"d": 1}, {"d": 2}, {"d": 1}, {"d": 3}, {"d": 4}]

Results

Consensus

Not supported

Other responses

Bash (JSONPath.sh)

[]

Elixir (jaxon)

[]

Elixir (warpath) ¹

[
  {
    "d": 2
  },
  {
    "d": 3
  }
]

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

[]

Golang (github.com-ohler55-ojg)

[
  {
    "d": 2
  },
  {
    "d": 3
  }
]

JavaScript (Goessner) ²

[
  {
    "d": 1
  },
  {
    "d": 1
  }
]

JavaScript (brunerd)

[
  {
    "d": 1
  },
  {
    "d": 2
  },
  {
    "d": 1
  },
  {
    "d": 3
  },
  {
    "d": 4
  }
]

JavaScript (jsonpath)

[]

JavaScript (jsonpath-plus)

[
  {
    "d": 1
  },
  {
    "d": 1
  }
]

Java (com.jayway.jsonpath) ¹ ³

[
  {
    "d": 2
  },
  {
    "d": 3
  }
]

Objective-C (SMJJSONPath) ¹ ³

[
  {
    "d": 2
  },
  {
    "d": 3
  }
]

PHP (softcreatr-jsonpath)

[
  {
    "d": 2
  },
  {
    "d": 3
  }
]

Python (jsonpath) ²

[
  {
    "d": 2
  },
  {
    "d": 3
  }
]

Swift (Sextant)

[
  {
    "d": 2
  },
  {
    "d": 3
  }
]

dotNET (JsonPathLib)

[
  {
    "d": 1
  },
  {
    "d": 1
  }
]

Errors

Clojure (json-path) ¹

java.lang.Exception object must be an array.

Golang (github.com-oliveagle-jsonpath) ¹

interface conversion: interface {} is nil, not string

Golang (github.com-spyzhov-ajson)

wrong request: wrong request: ?(@.d in [2, 3])

PHP (Goessner) ²

ArgumentCountError

Perl (JSON-Path)

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

Ruby (jsonpath)

invalid value for Integer(): " 3])"

Rust (jsonpath_plus)

Error Parsing JSON Path:
$[?(@.d in [2, 3])]
panic occurred

Footnotes