filter array in typescript and using % code example
Example 1: angular array filter typescript
ngOnInit() {
this.booksByStoreID = this.books.filter(
book => book.store_id === this.store.id);
}
Example 2: filter typescript
this.booksByStoreID = this.books.filter(book => book.store_id === this.store.id);