Json-mask
json-mask Tiny language and engine for selecting specific parts of a JS object, hiding the rest.
The main difference between JSONPath / JSONSelect and this engine is that JSON Mask preserves the structure of the original input object.
It's complier uses a cute grammar syntax:
1 2 3 4 5 |
|
Translating it few examples, that are loosely based on XPath syntax:
a,b,c
comma-separated list will select multiple fieldsa/b/c
path will select a field from its parenta(b,c)
sub-selection will select many fields from a parenta/*/c
the star*
wildcard will select all items in a field
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
GIF FTW!
Special thanks to the author Yuriy Nemtsov for a wonderful module!