Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
JmesPath\AstRuntime Class Reference

Public Member Functions

 __construct (Parser $parser=null, callable $fnDispatcher=null)
 
 __invoke ($expression, $data)
 Returns data from the provided input that matches a given JMESPath expression.
 

Member Function Documentation

◆ __invoke()

JmesPath\AstRuntime::__invoke ( $expression,
$data )

Returns data from the provided input that matches a given JMESPath expression.

Parameters
string$expressionJMESPath expression to evaluate
mixed$dataData to search. This data should be data that is similar to data returned from json_decode using associative arrays rather than objects.
Return values
mixedReturns the matching data or null

The documentation for this class was generated from the following file: