If ai understand correctly you are looking for an upsert whithin an array , I think there are 2 ways :
- Use array filters with upsert: true
- Use aggregation pipeline update with $zip on the array.
I will try to write an example for you.
Thanks
Pavel