{
"users": [
{
"user": "name_test",
"user": "name_test1",
"user": "name_test2"
}
]
}
{
"users": [
{"user": "name_test"},
{"user": "name_test1"},
{"user": "name_test2"}
]
}
import json
args = "name_test2"
with open('config.json', 'rb') as fp:
jsondata = json.load(fp)
jsondata['users'] = [item for item in jsondata['users'] if item['user'] != args]
print(jsondata)