This sample node script takes a json data feed with complex hierarchy and writes a flat csv output file. This sample uses the FT election results json feed.
Open folder in Terminal and type npm install
to install dependencies (d3, for its csv and json modules)
open folder in Terminal, type node main.js
to run the script, it will return an output .csv file in the same directory.