I like too search in a type structure field

How can i find an team member in a strucute field.

  • \site\controllers\search.php

$resultsStudio = $site->index()->search($query,

How can i display the correct team member of the list if i search on team_name ( john )

<?php foreach ($resultsStudio as $result): ?>
<li><a href="<?= $result->url() ?>#studio"><?= $result->title()->html() ?></a>
//dump( $result );
$team = $result->team()->toStructure();
<? dump( $team ); ?>
<?= a::show($team) ?>

<?php endforeach ?>

Like this:

$member = $page->team()->toStructure()->findBy('team_name', 'name');

So easy! If i finish I will share my code. I make a search page for a almost a one pager.