DEV Community

Bob J
Bob J

Posted on

Help using one array of data to select data from a second array

Help using one array of data to select data from a second array.

I need to .... based on the names in one array , match to the same name in the second array , but pull different information from that same second array.... both arrays are [[]] ???

Top comments (1)

Collapse
 
jfullerco profile image
jfullerco

If you’re using JavaScript have you tried a hashmap?

Array1.map(arr1 => Array2.map(arr2 => arr1[arr2.linked_element]))