Please see my code that I'am not sure what I'm doing wrong?. I want to get new JSON data when the id="select1" has changed and then send the parameter to id="select2" and then id="select2" will be show data in option.
var appZone = new Vue({
el: '#el',
data() {
return {
options: [],
list:[],
selected:''
}
},
mounted() {
var self = this
axios.get('/wp-json/tour-api/v1/search/0')
.then(function (response) {
console.log(response);
self.options = response.data;
})
.catch(function (error) {
console.log(error);
});
},
methods: { …Run Code Online (Sandbox Code Playgroud)