I can't speak for this lib, but I've had a lot of success with csvkit [0], json2csv [1] and json directly with jq [2].
[0] https://github.com/onyxfish/csvkit
This is a great list, but IMO lacks the most powerful (but unfortunately unpopular) one:
https://github.com/dbro/csvquote
Apply it first, then do the normal processing with GNU coreutils and you'll cover most use cases.