writes out a csv with parsed json