supongamos que una matriz tiene un objeto como el siguiente
enter code here [ { "id": 0, "value": "carding", "name": "PAUL JOSEPH SCARSI" }, { "id": 1, "value": "carding", "name": "ARLIE CHRIS NOLLMAN" }]
producción:
[valor: cardado, nombre: ['paul', 'jhon']]
const ObjArr = [{id: 0, value: 'carding', name: 'paul'}, {id: 1, value: 'carding', name: 'jhon'}] const uniqueValues = [] const uniqueObjArr = ObjArr.filter(element => { const isDuplicate = uniqueValues.includes(element.value); if (!isDuplicate) { uniqueValues.push(element.value); return true; } return false; });