Convert json to csv with column titles