Using variable in structure field filter

Hi everyone. I’m trying to filter a structure field based on a variable, and am stuck, hoping someone could help me shed some light on what I’m sure is a basic q:

In the below code the ‘$ht->name’ value is what i want to also use in the second ‘finishes’ filter (i’ve used for now). What is the correct syntax to use here?

    $housetypes = $page->housetypes()->toStructure();
    foreach($housetypes as $ht): ?>

    <div class="housetype-card col-lg-4">
      <div class="image">image here</div>
      <div class="title rbl-bg-olive d-flex flex-column">
        <span><?= $ht->name() ?></span>
        <span><?= $ht->area() ?></span>
      <a href="#">View finishes &amp; options</a>

      <?php $finishes = $page->plots()->toStructure()->filterBy('housetype', '==', '');
      foreach($finishes as $finish): ?>

      <?= $finish->plotnumber() ?>
      <?= $finish->finish() ?>
      <?= $finish->roof() ?>

      <?php endforeach ?>

    <?php endforeach ?>

What is this? This is a string, not a variable.

Guess this is what you want to use?

<?php $finishes = $page->plots()->toStructure()->filterBy('housetype', '==', $ht->name());

My gosh, yes, I swear I tried that first and wasn’t working but must have been something else. Thanks again and apologies for wasting your time!