I am currently working with an arrayList that contains employee information such as employeename, grade, and designation. In my view, I have a multiselect component that returns an array of grades like [1,2,3]
once we select grade1
, grade2
, grade3
from the dropdown. Is there a way to filter my employee list based on these selected grades? Something along the lines of:
this.employeeList.filter(x=> x.grade in (grade1,grade2,grade3));
Alternatively, are there other methods to achieve this? Essentially, I need to filter my employee list based on the values selected in the multiselect component. Any suggestions would be greatly appreciated since I am new to typescript.