Filter array attribute in jsonb column type using jsonb_array_elements_text My Postgres version: 10.9

Using JsonB Column type which has a below structure:

columnName: favorites
{
"favouriteCity": "Boston",
"favoriteColors": ["Blue", "Red", "Green"],
}


Now, I want to filter all records which have favorite colors as Blue assigned.

I tried the below queries, but it didn't work.

select * 
from r_fav 
where favorites-&gt;&gt;'favoriteColors' in ('Blue', 'Red')


or

jsonb_array_elements_text(favorites-&gt;&gt;'favoriteColors' @&gt;'Blue', 'Red')


Any idea how can I filter this?
You can use the contains all ?&amp; operator with arrays:

select * 
from r_fav 
where favorites -&gt; 'favoriteColors' ?| array['Blue', 'Red']


That will return rows at least one of the colors exist in the array. If want those where all colors are contained, use the operator ?&amp; instead