I have some input text fields and my goal is to change the decimal separator from comma to point. In order to do that I'm calling a function which is this:
changeToDot() {
var name = event.target.name;
var value = event.target.value.replace(",", ".");
this.transaction.entry = value;
}
What I want to do is to use the value of "name" instead of typing "this.transaction.entry" because in this case name = entry. But it doesn't work when I try this.transaction.name since it creates a new name->value pair in the transaction object. So I need the correct syntax or a method to make it work.
Thanks.