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.
I have no specific output in mind. Just playing and investigating a little bit.
The dream would be to create a general converter function, which creates a flat csv over any json. A function which takes any json as input and produces a flat csv as output.
Often non technical Data Consumers of Open Data Hub ask for a CVS version, because using the json api is too complicated for them. In this cases a generic converter would be very helpful.
Patrick
OK,
I understand that people want to see data in spreadsheets.
But you still need to provide some logic (be it code or a JQ expression or whatever) to map your *particular* scheme into a CSV...
Something general like anyjsondata.toCSV() can be done but likely will do some tree trasversal that doesn't really give practical output for non-trivial nested data structures such as the response of /api/Accommodation.
Of course if the JSON is just an array of hashmaps with all scalar values then anything will work fine :)
Bye, Chris.