0👍
Given that the response of the API call was an array as per the screenshot and comment:
[
{
"id":1,
"firstname":"Neng",
"lastname":"vang",
"email":"nengvang@gmail.com",
"password":"1234"
}
]
The question was asking to retrieve the firstname and lastname, so the solution was to use the index 0 on the resulting array as follows:
this.login_result[0].firstname
and this.login_result[0].lastname
- [Vuejs]-Promise not executing as expected
- [Vuejs]-Why is the attribute 'key' and 'vars' not recognised
Source:stackexchange.com