Filtering from dataset

Hi all,

I am hoping you can help.

I have built a site for real estate how ever the code that I am trying to use for filtering doesn’t seem to work can someone point out where I am going wrong.

You probably want to have line 20 right after line 16 (inside the then() block).

Hi J.D this didn’t seem to work.

i have attached the code. i am now getting a parsing error on line 20.

// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import wixData from ‘wix-data’

$w.onReady( function () {
// TODO: import wixData from ‘wix-data’;
});
export function button1_click(event, $w) {
$w( “#propertiesDataset” ).setFilter(wixData.filter()

    .contains( "town" , $w( '#dropdown1' ).value) 
    .ge( "bedrooms" , $w( '#dropdown2' ).value) 
    .between( "price" ,parseFloat($w( '#dropdown3' ).value),parseFloat($w( '#dropdown4' ))) 

.then((results) => { 
    console.log( "dataset is now filtered" ); 
    $w( "#propertiesRepeater" ).data =results.items; 
    $w( "#propertiesRepeater" ).expand() 
}). catch ((err) => { 
     console.log(err); 
    }); 
}