Can someone help me with reading data from two arrays? The first array looks like this:
tnails: [
{
mil: '/static/mini/t-icon-mil.png',
mar: '/static/mini/t-icon-mar.png',
brd: '/static/mini/t-icon-brd.png',
prs: '/static/mini/t-icon-prs.png',
pol: '/static/mini/t-icon-pol.png',
fbr: '/static/mini/t-icon-fbr.png'
}
],
and the second one is as follows:
this.headers = [
{
mil: 'Entry No. 1',
mar: 'Entry No. 2',
brd: 'Entry No. 3',
prs: 'Entry No. 4',
pol: 'Entry No. 5',
fbr: 'Entry No. 6'
}
]
I am trying to match values from headers
based on keys extracted from tnails
:
tn.substring(20, 23)
This gives me keys like mil
, mar
, etc.
The current code structure is like this:
<v-layout v-for="t in tnails" :key="t.id">
<v-flex v-for="tn in t" :key="tn.id">
<v-tooltip>
<img :src="tn" slot="activator">
<span>{{ headers (???) tn.substring(20, 23) }}</span>
</v-tooltip>
</v-flex>
</v-layout>
Any suggestions on how I can merge the data from these two arrays to display entries from headers
?