Iterating over a hash of hash of hashes

Discussion in 'Ruby' started by Steven Hirsch, Aug 19, 2008.

  1. 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}" }
    end
    end

    thanks in advance!
    --
    Posted via http://www.ruby-forum.com/.
     
    Steven Hirsch, Aug 19, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Hicks

    Iterating over an Array of Hashes

    Peter Hicks, May 3, 2011, in forum: Ruby
    Replies:
    14
    Views:
    257
    Peter Hicks
    Jun 11, 2011
  2. Jeff Thies

    iterating through hash of hashes

    Jeff Thies, Aug 30, 2003, in forum: Perl Misc
    Replies:
    7
    Views:
    168
    Benjamin Goldberg
    Sep 2, 2003
  3. Scott  Gilpin
    Replies:
    2
    Views:
    229
  4. Perl Learner

    Hashes of hashes or just one hash ?

    Perl Learner, Jun 8, 2005, in forum: Perl Misc
    Replies:
    11
    Views:
    220
  5. Tim O'Donovan

    Hash of hashes, of hashes, of arrays of hashes

    Tim O'Donovan, Oct 27, 2005, in forum: Perl Misc
    Replies:
    5
    Views:
    221
Loading...

Share This Page