jpath

XPath for JSON with yate-like syntax

jpath

XPath for JSON with yate-friendly syntax.

npm install jpath
<script src="./jpath.min.js"></script>
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