$parser
$parser
Compiles JMESPath expressions to PHP source code and executes it.
JMESPath file names are stored in the cache directory using the following logic to determine the filename:
__construct(string|null $dir = null, \JmesPath\Parser|null $parser = null) : mixed
string|null | $dir | Directory used to store compiled PHP files. |
\JmesPath\Parser|null | $parser | JMESPath parser to utilize |
if the cache directory cannot be created
__invoke(string $expression, mixed $data) : mixed
Returns data from the provided input that matches a given JMESPath expression.
string | $expression | JMESPath expression to evaluate |
mixed | $data | Data to search. This data should be data that is similar to data returned from json_decode using associative arrays rather than objects. |
Returns the matching data or null