DataViewsJS allows you to write a string expression and use it in a filtering condition. You can implement simple as well as complex filtering expressions in code using dataview.data.filter('FILTER EXPRESSION') syntax.
Use the following steps to implement filtering in DataViewsJS.
This example code uses a simple expression for filtering.
This example code uses a complex expression for filtering to show records for United States with New York as the state and quantity greater than 5.
dataview.data.filter('[Country]="United States" && [State]="NY" && [quantity] > 5');