Packages

TMap is a library for manipulating map objects, useful for master data management systems it is possible to define rules for keys/values replace, adding new keys/values by regex matching on otehr keys/values,... See Plugins direcctory for details

Current section

Files

Jump to
tmap README.md
Raw

README.md

# Tmap
**TMap is a simple library for transforming map (json) objects**
You can add, rename, remove keys, regex replace values using a rule file....
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `tmap` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:tmap, "~> 18.11.0"}
]
end
```
## Usage as library
See test files for usage samples.
## Usage as command line
Remember to built the exe file with
mix escript.build
```
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"]}]'
```