0๐
You can destructure inside a for loop. So your v-for would look like this:
<div v-for="({email, phone, address},index) in fields" :key="index">
<span> {{ email }}</span>
<span> {{ phone }}</span>
<span> {{ address}}</span>
</div>
- [Vuejs]-Vuejs strange behavior when a list of checkboxes are updated
- [Vuejs]-How execute a function inside a dialog?
0๐
Oh thanks for comments Ive understand, my fault
i need transform data to:
fields: [ { key: email, value: 'ignat@domain.com' }, { key: phone, value: '+1223456789' }, { key: address, value: 'Paris, some address..' } ]
And Show it:
<div v-for="(field,index) in fields" :key="index">
<span> {{field.key}}</span>
<span> {{ field.value}}</span>
</div>
Thanks For Help!
Source:stackexchange.com