I have a csv file and content is as below:
config,"[{""enabled"" : false,""id"" : ""name_of_app""}]"
region, US
app_name, test
I want to open csv, update "enabled" = false to "enabled" = true. I could do that if that's not a csv.
What I have done so far:
for name in filelist:
vfile = open(name, "r")
with open(name) as vfile:
reader = csv.reader(vfile) # Create a new reader
for row in reader:
payload = row[1]
if row[0] == "config":
print("hello")
json_payload = row[1]
json_payload=json.loads(json_payload)