You just have to parse the repeater :
$w("#repeater1").forEachItem( ($w, itemData, index) => {
// Check the corresponding index in dataset
$w("#dynamicDataset").getItems(index, 1) .then( (result) => {
// Perform the check and hide/show (same code as above)
...