From Json To CSV
fromJsonToCsv.js
This file shows the functions to turn a .json file to a .csv file and downloads it.
json2csv( jsonData, jsonFields )#
Transforms a .json file to a .csv file.
Parameters
jsonData (Json) - Json file to convert to csv
jsonFields (string) - Fields to convert to csv
download( content , fileName, mimeType )#
Downloads the .csv file created.
Parameters
content (Json) - Json file to convert to csv
fileName (string) - The name given to the file to download.
mimeType - mimetype to download.