Does anyone know how to remove duplicates in an array including the original value? I came across different snippets like this and this and some others but none in particul
You could try filtering your array based on the number of occurrences of a specific value in that array:
var arr = [1, 1, 2, 3, 5, 5] var res = arr.filter((el, _, arr) => { return arr.filter(el2 => el2 === el).length === 1 }) console.log(res)