2017 © Pedro Peláez
 

library json-iterator

Library for Iterate over JSON from a string or an array

image

c2is/json-iterator

Library for Iterate over JSON from a string or an array

  • Friday, October 2, 2015
  • by gmanen
  • Repository
  • 25 Watchers
  • 0 Stars
  • 38 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

JsonIterator

This library allows you to iterate over Json from a string or an array. Uses JsonPath to identify which nodes should be iterated upon., (*1)

JSONPath Examples

JSONPath Result
$.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<10)] filter all books cheapier than 10
$..* all elements in the data (recursively extracted)

Expression syntax

Symbol Description
$ The root object/element (not strictly necessary)
@ The current object/element
. or [] Child operator
.. Recursive descent
* Wildcard. All child elements regardless their index.
[,] Array indices as a set
[start:end:step] Array slice operator borrowed from ES4/Python.
?() Filters a result set by a script expression
() Uses the result of a script expression as the index

The Versions

02/10 2015

dev-master

9999999-dev http://github.com/

Library for Iterate over JSON from a string or an array

  Sources   Download

GPL-3.0+

The Requires

 

by John Daligault

json iterator