'Comparing multiple values per key in two dictionaries?

I am trying to compare two dictionaries, one dictionary contains multiple keys that are assigned to different SSIDs in the surrounding area, the ssid contains numerous values such as bssid, channel, security, etc. My other dictionary contains just one key thats assigned to SSID with the same numerous values.

What I want to do is individually compare the scanned_ap values of a duplicate ssid with the current network values to see if there's any discrepancies.

For example, the scanned_ap key is Network12345, which is already a key in current_networks. How do I compare each individual value from:

  • current_networks[Network12345] and scanned_ap[Network12345]
  • current_networks[ssid] = bssid, ap_channel, security,upTime,upFrom, first_time_seen, OUI
  • scanned_ap[ssid] = bssid, ap_channel, security, upTime, upFrom, first_time_seen, OUI
for ssid in scanned_ap.keys():
    if ssid in current_networks.keys():
        print("Duplicate AP found: {}, Checking other parameters...".format(ssid))

I have tried this but it only highlights that there is a duplicate SSID, I'm not too sure how to to then compare the individual values



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source