Skip to content

Instantly share code, notes, and snippets.

@Jammink2
Forked from wrburgess/gist:2170970
Last active August 29, 2015 14:11
Show Gist options
  • Select an option

  • Save Jammink2/6fcf0ca97fc241d611f3 to your computer and use it in GitHub Desktop.

Select an option

Save Jammink2/6fcf0ca97fc241d611f3 to your computer and use it in GitHub Desktop.

Revisions

  1. @wrburgess wrburgess created this gist Mar 23, 2012.
    9 changes: 9 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    require 'csv'
    require 'json'

    csv_string = CSV.generate do |csv|
    JSON.parse(File.open("filename.json").read).each do |hash|
    data = hash[1]
    theline = theline + " #{data},"
    end
    end