0
it is possible to change values in the frontend by coming to api?
For example, I have an api that returns this:
"data":[
"nome": "sp",
"nome": "mg",
"nome": "rj"
]
Then I make a simple request using it GET
this.axios.get("http://localhost/api/exemplo/").then(response => {
this.items = response.data;
});
Is there any way in the frontend I change these values to be displayed in a more "nice" way for the user? This without having to change anything in the bank, and displaying it in a v-for.
For example : São Paulo, Minas Gerais, Rio de Janeiro
How so change these values to be displayed in a more "nice" way for the user and displaying this in a v-for.??
– LeAndrade
If I did a v-go with that array
items
he’d show me off:sp
,mg
,rj
.&#And I was wondering if there’s any way to change that. This is just an example of something close to what I want to do, that doesn’t really roll to exchange names for the bank.– SkullFire
Of course it has how, starting from his example that values are a array, you can pick up and show each value separately through the
índice
array, no need to do a for.– LeAndrade
The return of the API you showed is not even valid JSON. Is an array? an object? if it is an array it will be an error because a literal array has no keys, and if it is an object it will also be an error because there are no duplicate keys. Adjust this so we can understand better please
– fernandosavio