1 00:00:02,160 --> 00:00:06,380 You might not want duplicate values and to avoid that, 2 00:00:06,390 --> 00:00:15,680 you can use an alternative to push. Instead of push, you can use add to set, add to set does almost the same 3 00:00:15,960 --> 00:00:22,770 but if I run it, you see now we have no duplicate values because add to set essentially also pushes 4 00:00:23,070 --> 00:00:28,440 but avoids duplicate values. If it finds that an entry already exists, 5 00:00:28,500 --> 00:00:30,690 it just doesn't push the new value, 6 00:00:30,810 --> 00:00:32,780 this is what adds to set does. 7 00:00:32,940 --> 00:00:39,090 So with that, with unwind, with push in the group stage and with add to set in the group stage, you 8 00:00:39,080 --> 00:00:45,330 get powerful features that should help you manage your array data efficiently and transform it into 9 00:00:45,330 --> 00:00:47,580 whichever format you require.