A
A
Alexey Yarkov2016-12-03 19:52:30
JavaScript
Alexey Yarkov, 2016-12-03 19:52:30

Converting json2csv on the client using JavaScript. Is there a finished implementation?

I wrote a json2xml converter here .
Now I would also like to convert to CSV, but there is a nuance:
1. The json objects have a secret field and it contains different keys (depending on the categoryID).
Accordingly, you need to split the array by the categoryID key and generate several CSV files. What about nested secret? For example:

"title","description","categoryID","secret"
"Рабочая сеть", "Сеть на работе","Wi-Fi сети",{"network_name": "ROSTELECOM_2151","password": "123456789"}

How do I keep the "secret"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aves, 2016-12-04
@yarkov

Ready module for node.js and browser and command line utility:
https://github.com/zemirco/json2csv#example-6

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question