Note that your use of results in line 18 is incorrect - results is not returned by setFilter().
You can see some code examples of setFilter() in the API . You apparently have a mismatch of parentheses or brackets which is causing the error. I believe that adding a line with a right parenthesis ) in line 17 will fix the error .
Here’s one example from the docs (with the missing line commented):
$w("#myDataset").setFilter( wixData.filter()
.startsWith("lastName", "D")
.ge("age", "21")
) // this line is missing in your code
.then( () => {
console.log("Dataset is now filtered");
} )
.catch( (err) => {
console.log(err);
} );