New to vuejs. I have a vue component that has two array props: countries and countryDetails
countries -> ['England', 'Germany']
countryDetails -> [ { country: 'England', capital: 'London' } ]
I’m able to display a dropdown using countries array.
<v-autocomplete
v-model="category"
:items="countries"
label="Countries" />
How do I get the capital to show up in a user editable text field when corresponding country selected and available in countryDetails array (England) or show an empty user editable text field when country not available in countryDetails array (Germany)
<v-text-field
class="mr-2"
v-model="countryDetails[i].capital"
label="Capital" />