Open mbtools opened 2 years ago
Nice idea. Worth checking. Just some of commands will not be support e.g. reference from non root.
The ..
is also a bit unclear - what if multiple nodes contain the attrs ? Is it the first one to select ?
..
returns all matching attributes. '$..attributes[0]` would give you the first.
Jq would be an option, too. Looks like a package of C with dependencies, though.
That was just for reference. Collecting some more data about the subject. jq is definitely widespread and popular. Maybe implement it's syntax instead. Just maybe.
Also Json pointer
also stumbled upon https://jmespath.org
also JSON Pointer, which seems to be a part of JSON schema: https://datatracker.ietf.org/doc/html/draft-handrews-relative-json-pointer-01
JSONPath could be a nice addition (https://restfulapi.net/json-jsonpath/):
Def:
Example:
Anyone up for a JS or PHP to ABAP port? https://code.google.com/archive/p/jsonpath/downloads