Aug-09-2017, 03:59 PM
(This post was last modified: Aug-09-2017, 04:00 PM by radioactive9.)
Hello
Not sure about how your json file looks but why not keep things simple and find the Value which is none. I am not sure what exactly you want to achieve but the below may help
Not sure about how your json file looks but why not keep things simple and find the Value which is none. I am not sure what exactly you want to achieve but the below may help
import json data = [] keys = ["field1","field2","field3","field4", "field5", "field6" ] with open('test_json.json') as json_data: for line in json_data: dataline = json.loads(line) row = [] for key in keys: row.append(dataline.get(key)) data.append(row)