Hi lugbz friends,
I have started looking for ways to convert json data into csv format.
For example to convert the json response provided by the Open Data Hub API about the list of accommodations:
Looking for simple shell tools, I came across jq, which is a powerful tool to filter json streams.
Usually it has to be used on the shell, but for playing there is even a handy website providing an online installation of the tool:
Even if I haven't been able yet to convert the json into csv format, still, I think it is a cool tool and worthwhile to be shared with you.
Did someone on the list already use it?
Best regards Patrick
I'm late to chime in...
I think it is important to understand that the *hard* part is extracting/remapping the info you need into something flat. From there, it's easy to store it into rows and columns.
How you do that depends on what you already know.
- you can use Node to run it as a traditional script
- If you use .filter() .map(), .reduce(), ecc. => functions, the code is going to be pretty compact
If you post what you want to extract from a sample outpust, I can provide some code as an example. If somebody else does the same with JQ we can compare the solutions.