1
I have any Javascript object, ex:
var pessoa = {nome: 'Carlos', cpf: '123', rg: '456'};
I need to list the fields that this Object has and the corresponding values.
To list the fields I got the following way:
Object.keys(pessoa);
//Saída no Console..
nome
cpf
rg
Now I need a way to list only the values of the fields..
//a saída deve ser assim..
Carlos
123
456
would be something like Object.values(person), but it doesn’t have this method...
How can I do that?
I think it might help you. http://answall.com/questions/127924/percorrer-um-array-sem-saber-seus-indices/127926#127926
– Marconi