help! hiding a section if the reference fields is empty

Already shown directly on the ANSWER above…

$w.onReady(function(){
	$w("#dynamicDataset").onReady(()=>{
		letitem=$w("#dynamicDataset").getCurrentItem();
		console.log("ITEM: ", item);
	});
});

Test this code and open the preview-mode in your Wix-Editor.
Open the console of it and inspect the results.

You will get something like…

{…} <--------> it’s an Object

…or you will get an ARRAY <---------> […]

Click onto this and open the data you got back as results.