Skip to content

Releases: loilo/jsonpath-php

v0.3.0

22 Jan 21:30

Choose a tag to compare

This release introduces a breaking change to the paths() method added (but not documented) in v0.2.0.

In v0.2.0, the return value of the paths() method was an array of associative arrays with a value and a path key each.

$path = $query->paths()[0]['path'];

In v0.3.0, the method has been changed to return an array of Loilo\JsonPath\PathResult objects, to improve type safety and to properly align it with the new path_segments() (and possible future) methods:

$path = $query->paths()[0]->path;