0👍
✅
You can use bracket notation: this.status['c']
instead of dot notation: this.status.c
You can then replace the literal property name string 'c'
with a variable. For example
method: {
changeStatus: function(target, value){
this.status[target] = value;
}
}
👤Dan
Source:stackexchange.com