creates a csv file from console query via url which has json data.