From: Jagadeesh Date: 2010-01-07T18:20:06+09:00 Subject: Help hi Gurus, Here my data structure 1234 => { 'open' => '1234-1', 'analyzed' => '1234-2', 'feedback' => '1234-3', 'closed' => '1234-4' } 3455 => { 'open' => '3455-1', 'analyzed' => '34552', 'feedback' => '3455-3', 'closed' => '3455-4' } My task is to display numbers [like 1234 or 3455] if they have ('open' OR 'analyzed') AND ('closed' OR 'feedback') keys. I tried following code puts numbers if $DATA[pr].has_key?( ( ('closed' || 'feedback') && ('open' || 'analyzed') ) ) I am not sure what is wrong with it but its not testing these conditions and printing all numbers. Please help me understanding has_key method and writing correct condition. Thanks