3 ms·
An alternative approach is to use XPath-inspired DSLs that work on JS or JSON object structures. These tend to work on strings, rather than declarative query ob
by jestar_jokin 11y ago
An alternative approach is to use XPath-inspired DSLs that work on JS or JSON object structures. These tend to work on strings, rather than declarative query objects. Examples:
JSPath: https://github.com/dfilatov/jspath https://github.com/dfilatov/jspath
JSONPath: https://github.com/s3u/JSONPath https://github.com/s3u/JSONPath
(Since you don't have type safety in JS, I don't think you lose much by using strings, unless you want to wrap it in TypeScript.)
- smizell 11y agoOr you could actually use XPath :) https://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.1.0/com.ibm.dp.doc/json_jsonxconversionexample.html https://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.1.0/...