5
Good night,
I need to remove duplicate results in an array with other nested arrays.
I have the following variable:
var dados = [
['maria', 'telefone', '324-5678', true],
['maria', 'telefone', '91234-5555', true],
['maria', 'telefone', '324-5678', false],
['jonas', 'telefone', '98888-1111', true],
['jonas', 'telefone', '56789-1010', true],
];
Where all records of the same name and with the same phone value should be removed.
In this case, the value to be returned should be:
var dados = [
['maria', 'telefone', '91234-5555', true],
['maria', 'telefone', '324-5678', false],
['jonas', 'telefone', '98888-1111', true],
['jonas', 'telefone', '56789-1010', true],
];
I tried using the set, but it only removes duplicated values if all values are in a single array.
Thank you for your attention
Thanks @Sergio, it worked perfectly.
– Aline Vianna