Repeater Data Query Hide & Show Results

Hello all if you could offer assistance here it would be very helpful.

Details:
1: Logged in users may click the (save) wishlist button and be stored in database.
2: In a search function when a user searches database the repeater results display all repeater items plus previously wishlisted items.

I cant seem to have each repeater item display saved items by user, it is either all items checked or none at all.


wixData.query("wishlist")
        .eq("check",true) 
        .find()
        .then((results) => {
 
 
 let resultCount = results.totalCount;
                $w("#repeater5").data = results.items;
                $w("#repeater5").forEachItem( ($item, itemData, index) => {                
 if (resultCount > 0) {
 
                     $w("#save").show();
                     $w("#delete").hide();
                }
 else {
              $item("#save").hide();
              $item("#delete").show();
          }
        })
 
        });

 });
 

I think the problem is in →

Try changing the $w to $item inside the repeater forEachItem
Something like this →

 $w("#repeater5").forEachItem( ($item, itemData, index) => {                
 if (resultCount > 0) {
 
                     $item("#save").show();
                     $item("#delete").hide();
                }
 else {
              $item("#save").hide();
              $item("#delete").show();
          }
        })

If my math and eyes are not bad, I see an extra }); in the last part of your code