Hide an element in a repeater when a boolean function

i want to hide an element in a repeater when a boolean function is set to false

Product:
wix studio

I have tried it with this code, I don’t get an error message, but it still doesn’t work. what am I doing wrong?

$w . onReady ( function () {

$w ( “#repeater1” ). onItemReady (( $item , itemData , index ) => {

$item ( “#vectorImage36 ). show ()

console . log ( itemData . status );

if ( itemData . star === “false” ) {

$item ( “#vectorImage36 ). hide ();

} else {

$item ( “#vectorImage36 ). show ();

}

});

});

Dataset = dataset1
Repeater = repeater 1
Element = #vectorImage36

any ideas?

I would appreciate your support.

Greetings from vienna, Tomas

See below example. I would hide your vector image by default and show if true. I think you just need to remove the quotations from around the boolean value.

$w('#repeater1').onItemReady(($item, itemData) => {
        if (itemData.star === true) {
            $item('#vectorImage36').show();
        }
    });

Hey there!
Thanks so much for getting back to me.
That’s a great solution!
Many thanks for the help and regards from Vienna, Mr Monday.