0
I’m doing a get and the answer is coming like this:
[
{"cep":"01050-070",
"rua":"Rua Álvaro de Carvalho",
"bairro":"Centro",
"cidade":"São Paulo",
"estado":"SP"}
]
I’d like Re sponse to come like this:
{
"cep": "01050-070",
"rua":"Rua Álvaro de Carvalho",
"bairro":"Centro",
"cidade":"São Paulo",
"estado":"SP"
}
My method is like this:
searchCep () {
this.$validator
.validateAll()
.then(success => {
if (success) {
const url = `http://localhost:4001/${this.cep}`
axios.get(url)
.then(response => this.data = response.data)
.catch(error => console.log(error))
}
})
}
Yes I do, I’m just studying. What would be the complete method with this change of yours?
– Isa