1. Go to this page and download the library: Download ronolo/json-query library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ronolo / json-query example snippets
use RoNoLo\JsonQuery;
$q = JsonQuery::fromFile('data.json'); // or ...
$q = JsonQuery::fromData(['foo' => 1, 'bar' => 2]); // or ...
$q = JsonQuery::fromJson('{"foo": "bernd", "bar": "kitty"}');
$result = $q->query('foo'); // or ...
$result = $q->query('foo.bar'); // or ...
$result = $q->query('foo.2.bar'); // or ...
$result = $q->query('foo.2.bar.0.name'); // or ...
$result = $q->query('foo.bar.name'); // etc.