This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Description
Apologies in advance, I'm new to JSONPath.
I do not understand why I am not able to filter based on keys, but a wildcard works. For example:
$content = [
'body' => [
'order' => [
'id' => 2
]
]
];
// doesn't find the element
var_dump((new JSONPath($content))->find('$.body.order[?(@.id == "2")]'));
// finds the element
var_dump((new JSONPath($content))->find('$..[?(@.id == "2")]'));