mergeBy works like , but uses an additional parameter (getter) to retrieve the value used for comparison. This additional parameter can be provided as a Function, or a String in which case mergeBy will retrieve the value associated to the provided key.