A simple command that flattens input json.
$ cat test.json | go run main.goConsider the following input object:
{
"a": 1,
"b": true,
"c": {
"d": 3,
"e": "test"
}
}In this example the path to the terminal value 1 is "a" and the path to the terminal value 3 is "c.d".
The program will output the flattened version:
{
"a": 1,
"b": true,
"c.d": 3,
"c.e": "test"
}