Show date to frontend, but save another

What would be the best way to show data to the frontend, but save something different to the db? I am making a custom input field, which is connected to an API. I want a single value of the api response to be shown inside of the input field, but want to save the full json to the database.
kian43d ago
Title should say data ^ I am now using setStateUsing(...) for setting the data 'behind the screens', and simple .value = .. to change the frontend