Когда я искал другой объект в одном объекте, я не попал в опцию поиска. Что я написал в своем коде html и файл ts
<div class="container">
<div class="row">
<div class="search-hero">
<input class="form-control" type="text" name="search" [(ngModel)]="searchText"
autocomplete="off" placeholder=" Start searching for a hero by id or name or
country">
</div>
<table class="table table-striped">
<thead>
<tr>
<th>Id</th>
<th>Hero Name</th>
<th>Country</th>
<th>venky</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let hero of heroes | filter:searchText">
<td>{{hero.id}}</td>
<td>{{hero.name}}</td>
<td>{{hero.country}}</td>
<span *ngFor="let ven of venky | filter:searchText">
<td>{{ven.nam}}</td>
</span>
</tr>
</tbody>
</table>
</div>
</div>
и в ts есть
export class AppComponent {
title = 'Angular Search Using ng2-search-filter';
searchText;
venky = [
{ id: 1, nam: 'venky' },
{ id: 2, nam: 'neeru' } ];
heroes = [
{ id: 11, name: 'Mr. Nice', country: 'India',"nam":this.venky},
{ id: 12, name: 'Narco' , country: 'USA',"nam":this.venky},
];
}
, когда я искал в героях объект venky, но его не было в поиске. Пожалуйста, кто-нибудь поможет здесь