From: Julian Leviston Date: 2009-02-16T11:02:35+09:00 Subject: Re: Multidimensional hash - get all not blank keys That was very positive! ;) hehe I agree, it's useful to say positive things. It's also useful to not feed people ready-made answers. My math teacher always said it's the working that's important, not the answer. Of we care about a person's understanding, we'll help them learn rather than give them direct answers. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 16/02/2009, at 8:19 AM, Douglas Seifert wrote: > I agree with david. If you have nothing positive to say, remain > silent. > > On Feb 15, 2009 12:50 PM, "William James" wrote: > > Michael .. wrote: > Hello. > > I have this Hash. > > > result={"1"=>{"6"=>"", >> "7"=>"", > ... > result.delete_if{|k,v| {} == v.delete_if{|a,b| b==""}} > p result > > {"1"=>{"1"=>"Value1", "3"=>"Value2"}, "2"=>{"8"=>"Value3"}, > "4"=>{"8"=>"Value4", "2"=>"Value5"}}