This method is like _.union except that it accepts iteratee which is invoked for each element of each arrays to generate the criterion by which uniqueness is computed. The iteratee is invoked with one argument: (value).
_.union
iteratee
arrays
The arrays to inspect.
Optional
The iteratee invoked per element.
Returns the new array of combined values.
_.unionBy
Rest
This method is like
_.unionexcept that it acceptsiterateewhich is invoked for each element of eacharraysto generate the criterion by which uniqueness is computed. The iteratee is invoked with one argument: (value).