import json
for k, v in sensor_data:
    with open(k+".json", "w") as f:
        f.write(json.dumps(v))
