I need something like lodash.intersectionWith but I also need duplicated values in result array.
Example:
var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
_.intersectionWith(objects, others, _.isEqual);
Expected Result:
[{ 'x': 1, 'y': 2 },{ 'x': 1, 'y': 2 }]
Thanks in advance!