2 / 2
May 2024

I have an object field that has multiple arrays. I want to get a single array field that has all items combined from the multiple arrays in the object field. Which aggregation stage and operator can I use to achieve this.

image
This is how the document structure is where fieldN is in object field which has multiple arrays

image

This is what I would like to achieve where fieldN is an array field which contains all items combined from the multiple arrays from before into a single array.

Any help on this would really be appreciated!!