0
I have the following object
Perfil1 ["Souza", "4", "3"]
Perfil2 ["Pedro", "2", "1"]
Perfil3 ["Lucas", "5", "8"]
and a range from 1 to 10
how do i change the profile number of each key according to the for number
I tried to do so, but to no avail
//Number é o numero que o for gera
console.log(perfil.Perfil+Number);
Example:
var obj = [{
"Perfil1":[
"Pedro",
"5",
"1"
],
"Perfil2":[
"Marcos",
"2",
"2"
],
"Perfil3":[
"Joao",
"2",
"1"
]
}]
var numero = new Number();
var numero = 2;//Quero definir um numero aqui, por exemplo 2 para "Marcos"
console.log(obj[0].Perfil + numero);//Retorna NaN
console.log(obj[0].Perfil2);//Setando direto ele retorna o resultado
What would be "profile number"? It has how to make a [mcve]?
– Woss
a moment I’ll make
– Stan
This would no longer resolve the issue in Nan: console.log(obj[0]. Profile + '+ number) ?
– AnthraxisBR
It would be more semantic to use object array instead of array object array. You really need to follow this format?
– BrTkCa