From: Clifford Heath Date: 2009-07-17T13:30:14+09:00 Subject: Re: how to know Array if have key? Zhenning Guan wrote: > a_array= [{"1"=>"11"}, {"2"=>"22"}] > how to test if a_array have a key "11"???? Arrays don't have keys, Hashes do. Here, you have an array with two elements. Both the elements are hashes. Neither hash has the key "11", though the first has it as a value. If you want to know whether a hash has a value, it's slow; you have to search the hash, or extract all the values and check for the one you care about.