.filter type script code example Example: filter typescript this.booksByStoreID = this.books.filter(book => book.store_id === this.store.id);