Hello, I am looking to iterate through this object and display checkbox values along with their indices.
data: [
{
key1: 'last 6 months'
},
{
key2: 'last 30 days'
}
]
I would like to create radio buttons that look like this:
° last 6 months
° last 30 days
This is what I have in my code:
<div
v-for="index in data"
:key="index.id"
>
<radio-button
v-model="date"
:value="index"
:label="index.key1"
/>
</div>
Currently, my results show:
° key1
° key2
I want to retrieve the value in the label, not the key, because the key is sent to the API.
Please help, thank you!