hello there, lets say i have a collection consisting of products for an ecommerce store. what i want to do is change title for products that are cheaper than 50. that is simple with aggregations with something like this :
but, with this approach, the output will only contain products that are cheaper than 50$. and if i want to run some other aggregation on the same collection i have to run another aggregation from start.
what i want to do is pass an argument to $set function and tell it to only work on documents that are cheaper than 50$.
is there a way i can achieve this with aggregations ?