● featured part · TypeScript · MIT · zero dependencies
jsonpathx
Modern JSONPath for TypeScript — RFC 9535 compliant, jsonpath-plus compatible, with a fluent builder API and built-in LRU caching. Built because jsonpath and jsonpath-plus stopped being maintained.
$ npm i @jsonpathx/jsonpathximport { JSONPath } from '@jsonpathx/jsonpathx';
// RFC 9535 filter
await JSONPath.query(
'$.store.book[?(@.price < 10)]', data
);
// fluent builder
await JSONPath.create(data)
.query('$.store.book[*]')
.filter(b => b.price < 10)
.map(b => b.title)
.execute();