array_where_not_in Filter
Removes elements from the array that have a specified item value that is contained within the given array:
{% set prices = [
{'product':'desk','price':200},
{'product':'chair','price':80},
{'product':'bookcase','price':150},
{'product':'pencil','price':30},
{'product':'door','price':100},
] %}
{{ prices|array_where_not_in('price', [150,200])|array_values|json_encode }}
{# [{"product":"chair","price":80},{"product":"pencil","price":30},{"product":"door","price":100}] #}