Angular 2 Ionic 2 - Compare two arrays, and get the ID’s from the NAME values that match into a New array.

1k Views Asked by At

I have a data entry page that is used to collect data for an HTTP PUT request. One of the ion-select options provides some name values to choose from. I need to get the ID’s from that array that match the users selected names for the PUT request; and not sure how to go about doing this. I found something similar here: comparing two arrays, they are trying to find the differences between the arrays in this example. Also, they are not using Angular/Ionic 2. Is there a simple way to do this in Angular/Ionic 2 that I’ve overlooked?.. Appreciate any guidance.

0

There are 0 best solutions below