Recursive JSON to csv conversion