My request is returning this:
data: Promise
Opening Developer Tools from Chrome I see this:
data: Promise
__proto__:Promise
[[PromiseStatus]]:"resolved"
[[PromiseValue]]:"24/01/2016"
Using the axios, how can you print this value?
Lista (url) {
axios.get(url)
.then(res => res.data)
.then(res => this.publicacaoList = res.map( (contato) => ({
data: axios.get(contato.id_url).then(res => res.data.data_registro).catch(e => console.log(e)),
email: contato.email,
tel: contato.tel
}) ) )
.catch(e => {
console.log(e)
})
}
Where contact.id_url is a url where I request to fetch the date. The fields of the email and tel table return normally, the date field returns an empty object {}