Afterwards an aggregation in mongodb
I get this results:
[
my_arr:[
{
id: ObjectId('618f7ef057c2923be10d1111')
//other stuff
},
{},
{},
]
]
Is there a way to remove the empty object directly in the aggregation? or it is necessary to do it server side? I get that after doing an unwind and a group.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment