process json format to csv