Created
August 18, 2022 08:30
-
-
Save SnowyPainter/7213d3fb4b0a83861e530a47a0748365 to your computer and use it in GitHub Desktop.
This file contains 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
let ids = new Set(arr1.map(d => d.id)); | |
let merged = [...arr1, ...arr2.filter(d => !ids.has(d.id))]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment