Is there a way to take a deep nested enum (examples below) like a map or a list and convert it to a plain CSV or direct to XLSX to export data?
Almost all our data resides in JSONB Postgres. We can export it to JSON but almost all our customers desire a spreadsheet format.
Map example:
%{"a" => [[1504224000000, 50],[1506816000000, 310]], "b" => [[1504224000000, 20],[1506816000000, 81]]}
List example:
[["a", [[1501545600000, 28],[1504224000000, 261]]], ["b", [[1501545600000, 28],[1504224000000, 261]]]]
Ideally output to CSV/XLSX:
a,1501545600000,28
a,1504224000000,261
b,1501545600000,28
b,1504224000000,261
PS: Nested enum can be way more complicated. Possibly output file with thousands lines.