1. Go to this page and download the library: Download phiil/xtraverse 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/ */
use Phiil\XTraverse\Traverser;
$traverser = new Traverser();
$title = $traverser->traverseData($path, $data, traverseArrayLimit: false); // we want a non-array value - pass "false" as the last argument or the service will throw an exception
echo $title;
use Phiil\XTraverse\Traverser;
// We want to update the title of the block we previously traversed to
$updatePath = 'blocks[1].title';
$traverser = new Traverser();
$data = $traverser->update($data, $path, 'New title')->data;