In Mongo database I have 2 collections . one users. two accountants . name and family fields are in both . I want to find documents which have name and family equal and add document id from collection accountants to a field array in user document. how can I do this ?
I tried $lookup but I want to add id to array not just show