Created
September 20, 2017 13:51
-
-
Save sethdavis512/5763c024229ef89d304361364eaea43d to your computer and use it in GitHub Desktop.
Lodash - Find difference between objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.reduce(obj1, (result, value, key) => { | |
const variantValue = obj2[key]; | |
return _.isEqual(value, variantValue) ? result : result.concat(value); | |
}, []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment