Timeline for How to merge two arrays in JavaScript and de-duplicate items
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 25, 2019 at 17:24 | history | edited | dota2pro | CC BY-SA 4.0 |
Converting Code to Demo
|
Nov 14, 2019 at 1:33 | comment | added | Rakibul Haq | for merging different objects without duplicating : stackoverflow.com/a/54134237/3131433 | |
Sep 25, 2018 at 10:29 | comment | added | carkod | It doesn't work if you are using an Array of objects | |
Feb 8, 2018 at 6:05 | comment | added | Robby Cornelissen |
@mwieczorek How about: const array3 = [...new Set(array1.concat(array2))]
|
|
Jan 10, 2018 at 7:26 | comment | added | mwieczorek | I Consider this the "Accepted Answer" for using ES6. | |
Jan 6, 2018 at 19:05 | history | answered | Benny Code | CC BY-SA 3.0 |