update()
method will replace a JSON document in a
dataset collection for a given KEY.
Let’s assume our JSON document contains
{"name":"Jane Doe"}
and the KEY is “jane.doe” and our
collection name is “people.ds”.
= "people.ds"
c_name = "jane.doe"
key = {"name":"Jane Doiel"}
obj if not dataset.update(c_name, key_obj):
print(dataset.error_message()
The update()
method returns True on success or False
otherwise.