Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Iterating over a hash of hash of hashes

Thread Tools

Iterating over a hash of hash of hashes

Steven Hirsch
Posts: n/a
Is there a more "rubyesque" idiom for iterating of a multi-dimensional
hash other than the following:

workq_dev.get_all_zapps.each do |k,v|
print "#{k} ==> "
v.each do |k,v|
puts "#{k} ==> "
puts v.class
v.each { |k,v| puts "#{k} ==> #{v}" }

thanks in advance!
Posted via

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Iterating over an Array of Hashes Peter Hicks Ruby 14 06-11-2011 09:42 PM
Hash of hashes, of hashes, of arrays of hashes Tim O'Donovan Perl Misc 5 10-28-2005 05:59 AM
Hashes of hashes or just one hash ? Perl Learner Perl Misc 11 06-09-2005 06:55 AM
Performance Improvement of complex data structure (hash of hashes of hashes) Scott Gilpin Perl Misc 2 08-26-2004 01:02 AM
iterating through hash of hashes Jeff Thies Perl Misc 7 09-01-2003 11:08 PM