From: Dot Baiki Date: 2009-09-17T02:11:37+09:00 Subject: Re: FasterCSV.foreach loop Good day Thanks to Mr. James Edward Gray II, I understand more and more :-) After trying to create an array of arrays, I got stuck again. It seems I can't properly create such an array. This is my mistake: data = FCSV.table(input_file) employee_id = data[:id].uniq employee_id.each do |id| employee_record = [] FCSV.foreach(input_file, :headers => true) do |row| if row["id"].to_i == id employee_record << [row] # create_odf_file(employee_record) end end break #just for testing once end I saw that FasterCSV.foreach creates an array/hash/something? # My array looks like this, but I can't access certain fields: [[#], [#], [#], [#], [#]] If I want an array which contains all records from one employee, should I use FasterCSV's filter class method? Or, how else can I pass this information to a class (ie. odf-report) in order to create the ODF output? I'll keep trying. BTW: If your once in our country, let me know :-) Greetings dot baiki -- Posted via http://www.ruby-forum.com/.