I have data like this - the keys for the phone object can be "mobile", "home"...
contacts[
11:{
name: "Mr Blobby"
phone: {
mobile: "07123 456789",
home: "0201 2345 6789"
}
...
}
...{}
Displaying it (cRud) is easy:
<div v-for="contact in contacts" :key="contact.id" :contact="contact">
<div v-for="(phone, type) in contact.phone" :key="type" :phone="phone">
<b>{{ type }}</b>
<h2>{{ phone }}</h2>
</div>
</div>
But how do I bind specifically the key (mobile/home...) using a select and v-model (CrUd) ?
<div v-for="(phone, index) in contact.phone" :key="phone">
<input type="tel" v-model.trim="contact.phone[index]" />
<select v-model="???">
<option value="mobile">Mobile</option>
option value="home">Home</option>
</select>
</div>