Below is Data Model
items1 = [
title: 'Abc',
items_containers : [
title: 'edf',
items_containers: [
title: 'pqr',
items_container: [
............
]
]
]
]
items2 = [
title: 'xyz',
items_containers : [
title: 'mno',
items_containers: [
title: 'uvw'
items_container: [
............
]
]
]
]
I need to write a logic in the pipe so that If I search the data with the title name child, it should show me the results including the parents and the children title.
search-pipe.ts
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'search'
})
export class Searchfunctionality implements PipeTransform {
transform(items: any, filter: any, defaultFilter: boolean) : any {
// logic here
}
}