Python JSON Vérifiez si la clé existe
if 'to' not in data:
raise ValueError("No target in given data")
if 'data' not in data['to']:
raise ValueError("No data for target")
Fafabulous