cat test.json | jq -c '.[]' > testNDJSON.json

jq is a language that consists of filters on input data to convert it into a specific output


By default, jq pretty-prints JSON output. Using this option will result in more compact output by instead putting each JSON object on a single line.



[{“name”:”JSON”, “good”:true}, {“name”:”XML”, “good”:false}]


{“name”:”JSON”, “good”:true}{“name”:”XML”, “good”:false}

For more details and examples, you can find them at this manual.

Data Scientist: Keep it simple.