Hello friends I have this result
As you can see in the Role column there is an object within objects, so what I want is to select that object that returns Roles:{"name"}, that is, I want to get the word teacher
This is my code
<?php foreach ($data as $d): ?>
<tr>
<td><?= h($d->id) ?></td>
<td><?= h($d->nombres) ?></td>
<td><?= h($d->apellidos) ?></td>
<td><?= h($d->rut) ?></td>
<td><?= h($d->dv) ?></td>
<td><?= h($d) ?></td>
</tr>
<?php endforeach; ?>
imagine doing this $d->_matchingData->Roles->name But this didn't work
If I'm not wrong, that's a dictionary, so you have to access the data with the key, try something like this:
since you are not trying to access an object, but a dictionary