Search code snippets, questions, articles...

_.intersectionBy method in Lodash

IntersactionBy in lodash is used to get intersection array from multiple arrays based on some expression.
const result1 = _.intersectionBy([2.8, 1.2], [2.3, 3.4], Math.floor);
console.log(result1);

Example Demo

Was this helpful?
0 Comments
Programming Feeds
Learn something new everyday on Devsheet