I have a Javascript object, eg:
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 have achieved the following:
Object.keys(pessoa);
//Saída no Console..
nome
cpf
rg
Now I need a way to list only field values.
//a saída deve ser assim..
Carlos
123
456
would be something like Object.values (person), but it does not have this method ...
How can I do this?