XPath for JSON with yate-friendly syntax.
npm install jpath
<script src="./jpath.min.js"></script>
jpath(obj, '/.foo.bar');
jpath(obj, '/.foo[3]');
jpath(obj, '/.foo[.bar]');
jpath(obj, '/.foo[.bar == "3"].lop');
jpath(obj, '/.foo[!.bar && .lop]');
jpath(obj, '/.foo[. == "1" || .lop != "bar"]');
More examples: tests