I have array of hashes:
@array = [{:id => "1", :status=>"R"},
{:id => "1", :status=>"R"},
{:id => "1", :status=>"B"},
{:id => "1", :status=>"R"}]
How to detect, does it contain in hashes with the value of status “B”? Like in simply array:
@array = ["R","R","B","R"]
puts "Contain B" if @array.include?("B")
Use
any?: