How to append to a array of hashes into CSV in Ruby 1.8. There is FasterCSV for Ruby 1.9 but how do I do in 1.8?
This is what I have tried. hasharray
is an array which contains elements which are hashes.
CSV.open("data.csv", "wb") { |csv|
hasharray.each{ |oput|
oput.to_a.each {|elem| csv << elem}
}
}
This way puts all the data in the CSV but it puts them one below another instead of side-by-side.