Filtering collection using code API

I am using setFilter() in the code API and it keeps producing an error. The code has been copied and pasted from the API documentation, but produces the error, ‘unknown character at position 8’. My code is:
export function button1_click(event,$w) {
let myValue = $w(“#input1”).value;
console.log(myValue);
$w(“members_table”).setFilter( wixData.filter().startsWith(“title”, myValue))
.catch((error) => {
let errorMsg = error.message;
let code = error.code;

} ); 

}
It seems to be something to do with the line with .setFilter() in it. Please help. I have been stuck on this for ages and the code used looks the same as other code i have seen in multiple tutorials.

Hi, looks like you’re missing the “#” sign when selecting the dataset with $w. It should be $w(“#members_table”).

Tomer,
Ive added the hash and it hasn’t stopped the error. Is the name of the collection supposed to be inside the parenthesis after the $w? I followed a video tutorial:
Wix Code: Creating Filter Buttons | User Input Table - YouTube
and did exactly what the girl did, but still get the same error. it worked for her??

The ID of the dataset you want to filter should be there. You can find it in the properties panel or by using code completion which suggests all the elements IDs you have on the page by pressing CTRL+SPACE.

Yes, the dataset name not the collection name. Fixed. Thank you so much xx