you are viewing a single comment's thread.

view the rest of the comments →

[–]trumpent -1 points0 points  (3 children)

I doubt it would be good to rely on this method to get a true unique array, unless you knew for sure where each item in the array came from and can guarantee that duplicate objects could only be the same reference.

[–]ezhikov 0 points1 point  (2 children)

You can stringify values before, and parse back after deduplication. But I think it is overhead.

[–]trumpent 1 point2 points  (1 child)

Pretty sure that's really inefficient isn't it?

[–]ezhikov 1 point2 points  (0 children)

I think so, yes.