stuff.each do |h|
  (first_key, first_value),(second_key, second_value) = *h
end


Awkward ** 2 ?!? ;-)

Best regards,
Abinoam Jr.


On Sat, Dec 21, 2013 at 7:00 PM, Mark K. <lists / ruby-forum.com> wrote:
> Carlo E. Prelz wrote in post #1131361:
>
>> If, instead of an array of hashes, you go for a hash of hashes, where
>> the key of the main hash is your name, like this:
>>
>> stuff={foo:{one:blah,two:blah},bar:{one:bleh,two:bleh}...}
>>
>> then you can iterate it like this
>>
>> stuff.each do |key,value|
>>
>> where key is your name and value is your tags hash. Of course, you
>> won't be able to have two elements with the same name (which you could
>> do in your example).
>>
>> Carlo
>
> Ah, that's a better idea.  Thanks.
>
> --
> Posted via http://www.ruby-forum.com/.