Hy, all of you

I am New here and I am making a site where I feel in a problem anyone can help me out please thanks in advance.

export function selectButton_click ( event ) {
$w ( “#dynamicDataset” ). onReady (() => {
let categories = $w ( “#dynamicDataset” ). getCurrentItem (). artistNams ;
console . log ( categories );
//let filter = $w(“#selectPunjabi”).label;
$w ( ‘#dynamicDataset’ ). setFilter ( wixData . filter ()
. contains ( “categories” , “English” )
. eq ( ‘artistNames’ , categories )

    ) 
}) 

}

This is my code. I am filtering language English with a button and this code is working but getCurrentitem is not working and current team is singer name. Please help

$w.onReady(()=>{
  $w('#selectButton').onClick(()=>{
	let myVariable = $w("#dynamicDataset").getCurrentItem();
	console.log ("RESULT: ", myVariable);
  });
});

Which result do you get in your CONSOLE ???

Hi Ninja, Thanks for the reply to my post but this is not working on site. Thanks again Any other suggestions for this please let me know thanks.

import wixData from 'wix-data';
$w.onReady(()=>{
$w("#dynamicDataset").onReady(() => {
  $w('#selectButton').onClick(()=>{
	 const categories = $w("#dynamicDataset").getCurrentItem().artistNams;
	if(categories){
		   $w('#dynamicDataset').setFilter(wixData.filter()
            	.contains("categories", "English")
           	 .eq('artistNames', categories)

       		 )
	}
  });
})
});