var contatos = [
{
nome: 'Alex Silva Souza',
endereco: 'Travessa 1, casa 233',
tel: '2235-3514',
id:1123,
email: '****',
},
{
nome: 'Beatriz Santana Pinto',
endereco: 'Rua cardoso de moraes, casa 21',
tel: '3448-3514',
id:1124,
email: '[email protected]'
},
{
nome: 'Felippe Roger Teles',
endereco: 'Rua Ana teles, casa 107',
tel: '2556-1818',
id:1125,
email: '****'
},
{
nome: 'Rogerio Machado da Silva',
endereco: 'Rua Baronesa, 231 ap101',
tel: '98337-3317',
id:1126,
email: '[email protected]'
},
];
var identificacao = []
My intention is to put within the array identification only the name and id properties. It would look like this:
var identificacao = [
{
nome: 'Alex Silva Souza',
id:1123,
},
{
nome: 'Beatriz Santana Pinto',
id:1124,
}
];
But what I'm doing returns this to me:
var identificacao = ["Alex Silva Souza", 1123, "Beatriz Santana Pinto", 1124, "Felippe Roger Teles", 1125, "Rogerio Machado da Silva", 1126]