Added method to convert from JSON to CSV and extract the headers from the JSON. Fixed missing object fields in the JSON.