I want to convert .json file into .csv file using ruby. Pleases help me to do this.
Also propose any tool to achieve this.
Try something like this:
require 'csv' require 'json' csv_string = CSV.generate do |csv| JSON.parse(File.open("foo.json").read).each do |hash| csv << hash.values end end puts csv_string