我有哈希数组:
@array = [{:id => "1", :status=>"R"},
{:id => "1", :status=>"R"},
{:id => "1", :status=>"B"},
{:id => "1", :status=>"R"}]
如何检测它是否包含在状态为“B”的散列中?就像在简单的数组中一样:
@array = ["R","R","B","R"]
puts "Contain B" if @array.include?("B")