Search...
filter( )
Creates a filter to be used with datasets and aggregations.
Description
The filter()
function builds a filter to be applied to a dataset or an aggregation, and returns a WixDataFilter
object.
The returned object contains the filter definition and is used with the setFilter()
function.
When working with Wix app collections, check which fields can be used in a filter.
Syntax
function filter(): WixDataFilter
filter Parameters
This function does not take any parameters.
Was this helpful?
Filter a dataset
Copy Code
1import wixData from 'wix-data';23// ...45$w("#myDataset").setFilter( wixData.filter()6 .startsWith("lastName", "D")7 .ge("age", "21")8);