-
Notifications
You must be signed in to change notification settings - Fork 7.1k
uniqBy
returns incorrect values
#5951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If you want to use _.uniqBy to ensure that duplicates are removed based on the person.name property only, you can add a condition to check if the object has a person property before manipulating the data. import _ from "lodash" const result = _.uniqBy( console.log(result); |
@vinaysharma14 I personally see this as a potential core feature that could be extremely useful. If you agree, please consider reviewing and upvoting the issue: #5953. |
Adds a new uniqByExisting function that behaves like uniqBy but skips elements where the specified property path doesn't exist. This addresses issue lodash#5951 and partially implements the feature request in lodash#5953 for mixed data formats.
@eugenemaxey curl -o media3-migration.sh |
The text was updated successfully, but these errors were encountered: