G
G
Grisha Gorokhov2020-11-21 14:04:43
Python
Grisha Gorokhov, 2020-11-21 14:04:43

How to replace data in json at some point of some element?

dictData = json.dumps({
                "ID": 310450,
                "login": "admin",
                "name": "James Bond",
                "password": "root",
                "phone": 3330303,
                "email": " [email protected]",
                "online": True})

how to replace data on a specific element

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
cpokimon, 2020-11-21
@che4ry

mydict = json.loads(dictData)
mydict['password'] = 'newpassword'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question