I have a dictionary with the following structure as:
Data2 = {
'1.1.1': {'unitReturnAirTemperature': 224, 'unitAirTemperature': 224, 'unitHumidity': 430, 'unitReturnAirHumidity': 431},
'1.1': {'unitName': 'Unit-01'},
'1.2': {'unitName': 'Unit-02'},
'1.2.1': {'unitReturnAirTemperature': 215, 'unitAirTemperature': 224, 'unitHumidity': 431, 'unitReturnAirHumidity': 399}
}
And I would like to get the following:
Data3 = {
'1.1.1': {'unitReturnAirTemperature': 224, 'unitAirTemperature': 224, 'unitHumidity': 430, 'unitReturnAirHumidity': 431, 'unitName': 'Unit-01'},
'1.2.1': {'unitReturnAirTemperature': 215, 'unitAirTemperature': 224, 'unitHumidity': 431, 'unitReturnAirHumidity': 399, 'unitName': 'Unit-02'}
}
The new dictionary (Data3
) should be based on the data from Data2
dictionary.