Similar to union, but uses an iteratee function to determine uniqueness.
union
Arrays to combine
Function to compute uniqueness
Array of unique values based on iteratee
unionBy([{x:1}], [{x:2}], o => o.x); // [{x:1}, {x:2}] Copy
unionBy([{x:1}], [{x:2}], o => o.x); // [{x:1}, {x:2}]
1.2.0
Similar to
union
, but uses an iteratee function to determine uniqueness.