How to use $addFields when iterating through each document of the Array

i am facing a challenge, i have array of documents… i want to add new field which is going to be result of a $filter… and for this filter input is another array field of the current document of the array we are iterating…

Structure is like this:

products:[
{
    "charges": [{}, {}, ....., {}]
},
{
    "charges": [{}, {}, ....., {}]
},
.
.
.
{
    "charges": [{}, {}, ....., {}]
}
]

Output expected:

products:[
{
    "charges": [{}, {}, ....., {}],
    "filteredCharges": [{}, {}, ....., {}]
},
{
    "charges": [{}, {}, ....., {}],
    "filteredCharges": [{}, {}, ....., {}]
},
.
.
.
{
    "charges": [{}, {}, ....., {}],
    "filteredCharges": [{}, {}, ....., {}]
}
]

@Sateesh_Reddy ,

Welcome to MongoDB community.

Have you tried an aggregation stage of $addFields:

{ $addFields : {
 "Products.filteredChanges": { $filter : ... }
}
}

Thanks
Pavel