I have two dictionaries as:
dict1 = {'Warning': [{'User account': 'User doesnot exist'},
{'Login': 'Login failed'}],
'Error': [{'Monitoring': 'Monitoring failed due to system crash'},
{'Scheduler': 'Scheduler stopped running'}]}
dict2 = {'Warning': [{'User account': 'User doesnot exist'},
{'Login': 'Multiple logins attempted'},
{'Version': 'Version doesnot match'}],
'Error': [{'Monitoring': 'Monitoring failed due to system crash'},
{'Scheduler': 'Scheduler never inititated'}],
'Critical': [{'Memory': 'Memory overflow'}]}
I have to compare two dictionaries and if the values(which is list of dictionaries) of dict2 are not common in dict1, have to return those: The expected output is:
result = {'Warning': [{'Login': 'Multiple logins attempted'},
{'Version': 'Version doesnot match'}],
'Error': [{'Scheduler': 'Scheduler never inititated'}],
'Critical': [{'Memory': 'Memory overflow'}]}
Any help is highly appreciated.