When I access https://jsonplaceholder.typicode.com/todos?_limit=1 in my browser I get:
[
{
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
}
]
I am now trying to print the result of a simple http GET request using axios in vue.js with the above URL:
const result = axios.get('https://jsonplaceholder.typicode.com/todos?_limit=1');
console.log("result is = " + result)
console.log("result.title is = " + result.title)
But the above gives the below output:
App.vue?234e:59 result is = [object Promise]
App.vue?234e:60 result.title is = undefined
Is it not possible to print a json friendly result from a http get request (like with curl) without having to deal with promises
in vue.js?