I am trying to access all the data from the NetworkDevicesLatencyStats call using python with the following function:
def getWirelesStats(network_id):
print("\nMeraki Wireless Settings")
response = dashboard.wireless_health.getNetworkDevicesLatencyStats(network_id, timespan=86400)
a = json.dumps(response)
b = json.loads(a)
print(b)
What would be the best way to parse through this to be able to print out the serial, latency stats, and voice/video traffic, etc from a pythonic standpoint? Thanks!
Right now I just get this dump:
{ "serial": "Q2JC-2MJM-FHRD", "latencyStats": { "backgroundTraffic": { "rawDistribution": { "0": 1234, "1": 2345, "2": 3456, "4": 4567, "8": 5678, "16": 6789, "32": 7890, "64": 8901, "128": 9012, "256": 83, "512": 1234, "1024": 2345, "2048": 9999 }, "avg": 606.52 }, "bestEffortTraffic": "same shape as backgroundTraffic", "videoTraffic": "same shape as backgroundTraffic", "voiceTraffic": "same shape as backgroundTraffic" }