I have an inner array as the following:
[
{'name': 'foo', 'size': 1},
{'name': 'baz', 'size': 2},
/* ... */
]
I'd like to update some outer field, total
which is the sum of all sizes, without querying the array in advance.
I'm aware of the aggregate paradigm but I'm not sure how to apply it here, if needed at all.
Thanks