Check out example codes for "angular array filter typescript". It will help you in understanding the concepts better.

Code Example 1

ngOnInit() {
  this.booksByStoreID = this.books.filter(
          book => book.store_id === this.store.id);
}

Learn ReactJs, React Native from akashmittal.com