<option v-for="{Service, Price} in delivery_array">
{{Service}} - Rp {{Price}}
</option>
that's my option list from delivery_array
My delivery_array value:
[
{"Price": "18000", "Service": "REG"},
{"Price": "30000", "Service": "FAS"}
]
I want to add value attribute in every option element with JSON object like this:
{"Price": "THE_PRICE", "Service": "THE_SERVICE"}
So it looked like this:
<option v-for="{Service, Price} in delivery_array" value='{"service":{{Service}}, "price":{{Price}} }'>
{{Service}} - Rp {{Price}}
</option>
But I have no idea how to code it like that.
I try it before with v-model attribute like v-model="Service", and I get the error message like this:
: v-model is not supported on this element type. If you are working with `contenteditable`, it's recommended to wrap a library dedicated for that purpose inside a custom component.
If I have a missing information or bad grammar in my question. I will edit it. Sorry for my bad english language.