I have two Lists
List 1 contains an object. One of the aspects of that object is a person ID [1,2,3,4,5] and List 2 contains the person ID's whom match a criteria [1,3,5]
I need to filter list 1 to only show the objects where the criteria is met.
Something like:
var sortedList = list1
.where((item) => item.personID == "Any of the ids contained within list2)
.toList();
Therefore sortedList = the objects for id 1,3,5