An implementation of the experimental JSON Query Language in PHP.
Note: This project is in beta stage! Feel free to report any issues you encounter.
Once installed, you can use the following code to get started:
$filter = new QueryExpressionFilter(array('age' => 20));
$filter->doesMatch(array('name' => 'Tester', 'age' => 20))); // true
$filter->doesMatch(array('name' => 'Tester', 'age' => 22))); // false
See also the examples.
The recommended way to install this library is through composer. New to composer?
{
"require": {
"clue/json-query": "~0.2.0"
}
}
MIT