Imagine that I have an object :
const inputField = {
a: “”,
b: “”,
c: '""
}
and I render that object with vue list:
<input type="text" v-for="(key, index) in Object.keys(inputField)" v-model="inputField[key]" :key="index">
How I can reassigne each property with empty string instead of using this function :
clear(){
Object.keys(inputField).forEach(key => {
inputField[key] = “”
})
}
What is the fastest way to reassigne it with empty string ?