I try to use or() in dataset setFilter(). But found that it doesn’t work. The code is following. Hope to get help to resolve this problem. Thank you !
import wixData from ‘wix-data’ ;
$w.onReady( () => {
$w( “#dataset1” ).onReady( () => {
$w( “#dataset1” ).setFilter( wixData.filter()
.eq( “path” , “A1” )
.or(
$w( “#dataset1” ).setFilter( wixData.filter()
.eq( “path” , “A2” )
)
)
.then( () => {
console.log( “Dataset is now filtered” );
} )
. catch ( (err) => {
console.log(err);
} );
} );
} );