I have two nested dictionaries that look like this:
d1 = {'a': {'b': {'c': 1}}}
d2 = {'a': {'b': {'d': 2}}}
and I need to merge them by nested keys, adding the nested elements. the result should be:
d = {'a': {'b': {'c': 1, 'd': 2}}}
I'm trying to build a recursive function, but maybe there is a better way available
any suggestion? thanks