creating json->csv for flat json struct