1
I am trying to "change" values of a vector received from the consumption of a JSON.
My logic was to create a for
to traverse the vector, parse the item on that partition and rewrite into a copy vector, thus having an array with the values I wish to.
let copia = [];
for(i = 0; i< data.day.lenght; i++){
switch(data.day[i]){
case 'Mon':
copia[i] = 'Segunda';
default:
copia[i] = 'Não'
}
}
return(
<Text style = {styles.welcome}>Day: {copia}</Text>)
The problem is that my vector copy is coming out blank always. What do you think?
You can post the JSON output for structure analysis?
– Maurivan