✅ You are viewing documentation for the latest version of Compose SDK.
Version:
# Function intersection
intersection(
filters
,config
?):Filter
Creates a filter representing the intersection of multiple filters on the same attribute. The resulting intersection filter filters on items that match all of the given filters.
To create 'and' filters using different attributes, use the and()
function.
# Parameters
Parameter | Type | Description |
---|---|---|
filters | Filter [] | Filters to intersect. The filters must all be on the same attribute. |
config ? | BaseFilterConfig | Optional configuration for the filter |
# Returns
A filter instance
# Example
Filter for countries that start with the letter 'A' and end with the letter 'A' in the Sample ECommerce data model.
filterFactory.intersection([
filterFactory.startsWith(DM.Country.Country, 'A'),
filterFactory.endsWith(DM.Country.Country, 'A'),
])