MongoDB aggregate, how to addToSet each element of array in group pipeline – Artificial Intelligence
I have documents that contains a tags fields. It's a simple array with tag names inside, no object nor _id inside. Just plain tags like this ["Protocol", "Access", "Leverage", "Capability"]. And in my group pipeline I tried something like 'selectedTags':…