add method to translate json to csv