Last active
April 5, 2019 16:59
-
-
Save wholypantalones/d0de771a0b2190b5a0efa9e744816a94 to your computer and use it in GitHub Desktop.
Compare two arrays of objects for differences
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
b.filter(o => !a.find(o2 => o.id === o2.id)) | |
b.filter(({ value: id1 }) => !a.some(({ value: id2 }) => id2 === id1)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment