I create Vue object and need update some data when get response
new Vue({
el: "#app",
data: {
message: [1,2,3,]
},
methods: {
getList: function () {
var myGet = axios.get('/api/guests/.json')
.then(function (response) {
// ????????? message = response.data;
})
.catch(function (error) {
console.log(error);
});
}
},
created:function () {
this.getList();
}
});
how to update vue object value inside this object? how to update 'message' ?