Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Implement "has" / "!has" filter operators #4952

Merged
merged 1 commit into from
May 5, 2016
Merged

Implement "has" / "!has" filter operators #4952

merged 1 commit into from
May 5, 2016

Conversation

jfirebaugh
Copy link
Contributor

@mb12
Copy link

mb12 commented May 5, 2016

@lucaswoj What is the difference between "has" and "in" operators?

@lucaswoj
Copy link
Contributor Author

lucaswoj commented May 5, 2016

@mb12 "has" returns true if a feature provides a value for key. in returns true of the value for key is in a provided set of values.

['has', 'mapbox'] // returns true if the feature has a value for "mapbox"
['in', 'mapbox', 'neat', 'swell', 'great'] // returns true if the value for "mapbox" is 'neat', 'swell', or 'great'

@lucaswoj
Copy link
Contributor Author

lucaswoj commented May 5, 2016

It is similar to but not quite the same as ['==', 'mapbox', undefined]

@jfirebaugh jfirebaugh merged commit 59a7fbf into master May 5, 2016
@jfirebaugh jfirebaugh deleted the has-filter branch May 5, 2016 21:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants