From: Raimon Fs Date: 2007-12-07T07:33:36+09:00 Subject: Re: array iterator that have more arrays that also need iter Xavier Noria wrote: > On Dec 6, 2007, at 10:02 PM, Raimon Fs wrote: > >> yes, but the values where written at once: >> >> 82567.3695778.2113210.85 >> >> and I want separated, for adding them into a cell of a table, with >> value > > Then you are done removing the call to flatten: > > invoice_calculs.map(&:attributes).map(&:values) > > -- fxn I'm sorry but I don't understand ... I'm using your first suggestion: > values = invoice_calculs.map do |ic| > ic.attributes > end.map do |a| > a.values > end.flatten with or without the .flatten all the values are written at the same time ... your new suggestion : invoice_calculs.map(&:attributes).map(&:values) also writtes the three values at one time, I need each value separated: element one: 82567.3695778.2113210.85 and I need: 82567.36 95778.21 13210.85 I hope it's more clear what I'm trying to do now ... :-) regards, and thanks! rai -- Posted via http://www.ruby-forum.com/.