Closed amreo closed 4 years ago
Technically the $addToSet
operator has the same functionality but first checks if the value already exists in the document: https://docs.mongodb.com/manual/reference/operator/update/addToSet/
Maybe we can support both operators using the same code by adding a parameter to check the array before adding.
Thanks for working on this. I'll will do the suggested changes myself..
Ok
Fixes #2
What do you think @256dpi?