Skip to content

An expression to check if an array contains a given value #4698

@dagjomar

Description

@dagjomar

Example:
A feature has properties:

{ colors: ['red', 'green', 'blue'  }

now, I want to filter the features that has one or more of the colors I want to filter on.

filter: ['any', ['inArray', 'colors', 'green'], ['inArray', 'colors', 'blue'] ]

or

filter: [ '!inArray', 'colors', 'green' ]

It seems like the inverse variant of the membership filter 'in' and '!in'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions