I'm using MongoDB with Mongoskin with a NodeJS server. I'm trying to add an entry in a document's field using addToSet
to avoid adding duplicates. How do I know whether my add was successful or not?
Checking the return value didn't really help me, it always returned a 1
. I know using mongo shell I can see what I want from the WriteResult. Is there any way to access this using Mongoskin? This is the closest I can get. Are there any ways to do check whether the add was successful or not?
Thank you in advance.