jpath

0.0.20 • Public • Published

jpath

XPath for JSON with yate-friendly syntax.

Instalation

Node

npm install jpath

Browser

<script src="./jpath.min.js"></script>

Usage

jpath(json, '/.foo.bar');
jpath(json, '/.foo[3]');
jpath(json, '/.foo[.bar]');
jpath(json, '/.foo[.bar == "3"].lop');
jpath(json, '/.foo[!.bar && .lop]');
jpath(json, '/.foo[. == "1" || .lop != "bar"]');

More examples: tests

Readme

Keywords

Package Sidebar

Install

npm i jpath

Weekly Downloads

4

Version

0.0.20

License

none

Last publish

Collaborators

  • artjock