Hey there @jdjdjd, and welcome to the forum!
First of all, well done for getting this far! Dealing with tables and variables as their data source is not a simple thing.
The approach I would take is using setIn for the variable and update the variable upon each change the user makes. I made a quick video explaining it here.
Here's also the json of the app so you can test it your self
SetIn variable Demo.json (68.2 KB)
The snippets for the setIn event:
Key Path:
[{{ table1.selectedDataIndex}},{{ self.changesetArray.map(obj => Object.keys(obj).find(key => key !== "id"))[0] }}]
Value
{{ self.changesetArray.map(obj => obj[Object.keys(obj).find(key => key !== "id")])[0] }}
Hope this helps!