Let's say I have the following nested dictionary d:
d = {'1':{'80':982, '170':2620, '2':522},
'2':{'42':1689, '127':9365},
'3':{'57':1239, '101':3381, '43':7313, '41':7212},
'4':{'162':3924} }
and an array e:
e = ['2', '25', '56']
I want to extract the minimum value of the key-value pairs in each entry in d while excluding all keys in array e.
So, for example, the smallest key-value pair in d['1'] is '2':522, but since '2' is in array e, I would like to ignore this element and find the smallest value whose key is not in e. So for d['1'] the correct answer would be '80':982. I want to do this for all entries in d. The output should be an array with this format
['1', '80', 982, '2', '42', 1689 ...etc]