Good afternoon, friends I have a problem here in javascript. I have an array, but with each index it is adding a double quotation mark, and I want to remove them from there. My code looks like this:
dados = new Array();
$.get(url, function(response){
for(i in response.content) {
horario = parseInt(response.content[i].Horario);
tempo = parseInt(response.content[i].Tempo);
dados[i]= "["+ horario +", "+ tempo + "]";
dados[i] = dados[i].replace(' " ', ' ');
}
console.log(dados);
});
And my return is like this
And it would have to look like this:
[[0, 54], [0.65], [10, 60]]
Does anyone know if why replace is not working?
EDIT
I forgot to mention the important part, I'm going to use this array for a chart and the data model it reads is like this:
data: [ [0, 54], [5, 65], [10, 60] ]
So I already concatenated there in it the open "keys" in each of the indices