<input type="text" v-model="object[obj]">
Output:
object:{'obj1':value}
Desired outcome after input is added:
object:{'obj1':{'prop1':value,'prop2':value}}
<input type="text" v-model="obj">
<input type="text" v-model="object[obj]['prop1']">
<input type="text" v-model="object[obj]['prop2']">
{{object}}
export default {
data() {
return {
obj: '',
object: {},
}
}
}
Is it possible to accomplish this using v-model
or a custom input handler?