PHP code example of lts / phpxq
1. Go to this page and download the library: Download lts/phpxq 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/ */
lts / phpxq example snippets
$names = LTS\PhpXq\Jq\Jq::run('.items[] | .name', (new LTS\PhpXq\Json\JsonDecoder())->decodeOne($json));
$yaml = LTS\PhpXq\Yq\Yq::evaluate('.items[0].n = 10', $yamlText);