when i code like this. it do works. the data in pinia is updated
let thePerson = this.store.getPersonById(this.personId); //
thePerson.id_card = this.person.id_card;
thePerson.name = this.person.name;
thePerson.contact = this.person.contact;
thePerson.gender = this.person.gender;
but when i use any of these, it not work.
//thePerson = Object.assign({}, this.person);
//thePerson = JSON.parse(JSON.stringify(this.person));
//thePerson = { ...this.person }; not work
is there any short way to do this?