intersection * _. intersection (arrays)
Computes a list of values ββthat intersect all arrays. Each value in the result is present in each of the arrays.
_. intersection ([1, 2, 3], [101, 2, 1, 10], [2, 1]); => [1, 2]
var arrayValues = [[2,3,5],[3,5]]
Here arrayValues ββis an array containing 2 arrays. Where, like _.intersection expects arrays as a parameter, not an array with arrays.
_.intersection([2,3,5],[3,5])
or
_.intersection(arrayValues[0],arrayValues[1])
will be displayed as what you need.
source share