I have a VueJS component where I need to populate a html select box with data from a JSON response.
This is my VueJS method:
getTaskList() {
axios.get('/api/v1/tasklist').then(response => {
this.taskList = this.data.taskList;
});
}
While researching, I came across an example in the VueJS documentation but I'm still having issues with the method...
How can I transfer this response data into a selectbox? I am familiar with using v-for
, but I am unsure how to initialize this data in HTML (possibly with v-bind or something similar).