I need to format the values across all “sum” keys.
How can I do that?
Deep nested map is always different.
Are there ways besides recursion during which we check the value of the key by type of whether the key is “sum” or not and checking the type of value of each element - by type if the value is a list or map, then we fall into yet another recursion.
If you have a recursive data structure, then you have to use recursion in order to handle it.
If you know the structure in advance, then update_in/3 can help