When using vue.js 2 CLI, I typically define object data like this within the data() function:
data(){
return{
user: {
user_mail: '',
user_password: '',
user_confirm_password : '',
user_phone : '',
user_fname: '',
user_lname: '',
},
}
},
Afterwards, I attempt to display this object in the log using the mounted function:
mounted() {
console.log(this.user)
},
It works as expected. However, when I attempt to iterate through it using forEach, I encounter an issue:
mounted() {
Array.from(this.user).forEach((value) => {
console.log(value)
});
},
Unfortunately, I do not receive any output in the log in this situation. Any advice or suggestions would be greatly appreciated. Thanks :)