From: Xavier Noria Date: 2007-12-07T05:40:26+09:00 Subject: Re: array iterator that have more arrays that also need iter On Dec 6, 2007, at 9:12 PM, Raimon Fs wrote: > maybe they are AR, because I get those values from a loop, where I > issue > some sql: > @temp_result = InvoicesCalcul.find_by_sql('SELECT sum(base) > AS > "'+ @name_base + '" ,sum(import) AS "' + @name_tax + > '" ,sum(total_net) > AS "' + @name_total + '" FROM invoices_calculs c, invoices i WHERE > c.tipus='+KIND_TAX_IVA.to_s+' AND c.invoice_id=i.id AND c.xcent='+ > @value +' AND i.any='+@c_year) > > and I add those results into an array. @temp_result is already an array of ARs. > what I see, with your suggestion, I have the same issue as before, I > want to retrieve the values without knowing the attribute, only by the > index: No, no. Please reread the code, it extracts the values without touching the keys. I think that's what you want. -- fxn