Tmap
TMap is a simple libraryfor transforming map (json) objects
You can add, rename, remove keys, regex replace values using a rule file....
Installation
If available in Hex, the package can be installed
by adding tmap to your list of dependencies in mix.exs:
def deps do
[
{:tmap, "~> 18.11.0"}
]
end
Usage as library
See test files for usage samples.
Usage as command line
used for parsing jsonline files/streams
cat myjsonfile.json | tmap --rules-file sample_rules_type.json
tmap --rules-file sample_rules_type.json --input-file myjsonfile.json --output-file newjsonfile.json
cat myjsonfile.json | tmap --rules '[{"action": "KeysSelect", "keys": ["brand"]}]'