<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, data, key):
 """Update a key's value's in a JSON file."""

        og_data = self.read()
        og_data[key] = data
        self.write(og_data)