I want to use an expression to select features matching the values of an array.
Select features from a list is done by the IN operator:
"field" IN ('value1','value2')
But how to select features from an array like ['value1','value2']? Do I have to convert it to a list (somehow) or is there a "direct" method of doing so?
QGIS 3.10
Best Answer
The expression builder has a whole section of functions for dealing with arrays.
(Source: QGIS User Manual)
Use
array_contains(your_array, "field")
to test whether your array contains the current field value.