PHPackages                             c2is/json-extractor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. c2is/json-extractor

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

c2is/json-extractor
===================

Library for extracting JSON from a string or DomDocument object

v1.0.1(10y ago)116.6kGPL-3.0+PHPPHP &gt;=5.3.2

Since Oct 2Pushed 10y ago24 watchersCompare

[ Source](https://github.com/c2is/JsonExtractor)[ Packagist](https://packagist.org/packages/c2is/json-extractor)[ Docs](http://github.com/)[ RSS](/packages/c2is-json-extractor/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

JsonExtractor
=============

[](#jsonextractor)

This library allows you to extract Json from a string/json/array using JsonPath.

JSONPath Examples
-----------------

[](#jsonpath-examples)

JSONPathResult`$.store.books[\*].author`the authors of all books in the store`$..author`all authors`$.store..price`the price of everything in the store.`$..books[2]`the third book`$..books[(@.length-1)]`the last book in order.`$..books[0,1]`the first two books`$..books[:2]`the first two books`$..books[?(@.isbn)]`filter all books with isbn number`$..books[?(@.price
