How to hide elements in repeaters if the data is false

Hi an update. I have solve issue 1. Turned out i should have used “$item” instead of “$w”. However, now there’s another issue. The repeater items only display the details correctly until 6-7 items. after that it is showing the default value again. the one highlighted in red is the one showing the default value.

import wixData from ‘wix-data’ ;

$w . onReady ( function () {

fillincardetails () 

});

function fillincardetails ( ) {
$w ( “#dataset10” ). onReady (() => {

    $w ( "#repeater10" ). forEachItem (( $item ,  car , ) => { 

        let  yearbrand  =  car . yearbuilt  +  " "  +  car . brand ; 
        let  model  =  car . model ; 
        let  carspectext  =  car . transmission  +  " · "  +  car . fuel  +  " · "  +  car . type ; 
        let  deals  =  car . deals 
        //console.log("Current-Item: ", yearbrand); 
        //console.log("is it deal?", deals) 
        
        $item ( '#text18' ). text  =  yearbrand ; 
        $item ( '#text17' ). text  =  model ; 
        $item ( '#text64' ). text  =  carspectext ; 
        

        if  ( car . deals  ===  **true** ){ 
            let  dealprice  =  "RM "  +  String ( car . sellpricerm . toLocaleString ()); 
            let  beforedealprice  =  "RM "  +  String ( car . dealpricerm . toLocaleString ()); 
            $item ( '#text63' ). text  =  beforedealprice ; 
            $item ( '#text62' ). text  =  dealprice ; 

            $item ( '#text63' ). show (); 
            $item ( '#line2' ). show (); 
            $item ( '#box34' ). show (); 
        
        }  **else**  { 
            let  dealprice  =  "RM "  +  String ( car . sellpricerm . toLocaleString ()); 
            $item ( '#text62' ). text  =  dealprice ; 

            $item ( '#text63' ). hide (); 
            $item ( '#line2' ). hide (); 
            $item ( '#box34' ). hide (); 
            $item ( '#text63' ). collapse (); 
            $item ( '#line2' ). collapse (); 
            //$item('#box34').collapse(); 
        } 

    }) 
}) 

}