dchester / jsonpath

Query and manipulate JavaScript objects with JSONPath expressions. Robust JSONPath engine for Node.js.
MIT License
1.35k stars 216 forks source link

SQL/JSONPath support #163

Open mattbishop opened 3 years ago

mattbishop commented 3 years ago

SQL/JSONPath, part of SQL 2016, is a simplification of JSON Path that removes recursive descent (..), replaces negative array seeking with last and remakes array length to size(). An older writeup is here: https://modern-sql.com/blog/2017-06/whats-new-in-sql-2016#json-path

mattbishop commented 3 years ago

Also, it separates the path from the value filter.

$.store.book[?(@.price<10)]

becomes

$.store.book[*].price ? (@ < 10)