I need to save the result of a promise (value
) within the object this.$user.$data.key
(https://www.jovo.tech/docs/data/user). The value returned by the promise is correct but the assignment does not modify the local db db.json
file (https://www.jovo.tech/docs/databases/file-db)
The code is similar like this:
myIntent(){
var _this=this;
.then(function(value) { //value is the result of the promise
_this.$user$data.key=value; //does not modify db.json
console.log(value) //is correct
})
}
someone can suggest me some solution, please?