From: Alex McHale Date: 2004-06-25T04:40:35+09:00 Subject: Re: N Dimensional Hash? What about something like this? require 'pp' class Hash alias origindex [] def [](*depth) return origindex( depth.first ) if depth.length == 1 top = self depth.each {|level| top = top.origindex(level) break unless top.respond_to? '[]' } top end end h = { :mini => { :cooper => :red }, :ford => { :focus => :white, :mustang => :blue } } pp h[] pp h[:mini] pp h[:mini, :cooper] pp h[:something, :else, :another] The error handling needs to be cleaned up so that this different [] behaves more identically to the original [], but maybe this is something along the lines of what you're looking for? Note that in this case, h[:something, :else] is different than h[:else, :something]. It's something to start with, at least. Alex