Hi, I want to update three fields namely primary_ids, secondary_ids and wildcard_ids. All are of type array of int. I am doing this using $addToSet operator. In case, If any of the field does not exist or is null, then the query is returning error.
Is there a way to check which field is null before $addToSet or any other method to implement this.
Thank you!