Move from line by line items to object by object.

This commit is contained in:
jowj 2020-01-27 16:35:56 -06:00
parent 1d02b3102b
commit 34e94f6576

View File

@ -108,8 +108,9 @@ while is_on:
# queue up an alert if stateChanged = True
results = []
with open("/shared/results.json", "r") as json_File:
for line in json_File:
results.append(json.loads(line))
json_data = json.load(json_File)
for item in json_data:
results.append(item)
for item in results:
for key, value in item.items():
if stateChanged is True: