Hi, How can i fitler array of objects from simple array. I've two array like below I want to get the array of object whose id is selected in simple array.
- Array1 = ["1223", "2344", "8775" ];
- Array2 =[{ID: "1223", OrderNo: "8", Name: "Alex", DOB: "02/24/1989"}
- {ID: "2443", OrderNo: "7", Name: "Jordan", DOB: "02/20/2000"}
- {ID: "8775", OrderNo: "6", Name: "Michel", DOB: "11/09/1877"}
- {ID: "2344", OrderNo: "1", Name: "Hallen", DOB: "12/25/1887"}]
I want to get the resulting array of object including the elements in Array1. dummy resulting array like below.
- resultArray =[{ID: "1223", OrderNo: "8", Name: "Alex", DOB: "02/24/1989"}
- {ID: "8775", OrderNo: "6", Name: "Michel", DOB: "11/09/1877"}
- {ID: "2344", OrderNo: "1", Name: "Hallen", DOB: "12/25/1887"}]