Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

214
Vistas
find and create a new array just with one sort of value and eliminate duplicates (if many)

I'm trying to find a method for sorting an array by uuid and eliminate the duplicate.

For exemple i have a array like this :

const x = [
{id: 1, uuid: xxxx-xxxx-xxxx-xxxx, content: 'string'},
{id: 2, uuid: xxxx-xxxx-xxxx-xxxx, content: 'string'},
{id: 3, uuid: xxxx-xxxx-xxxx-xxxx, content: 'string'},
{id: 4, uuid: xxxx-xxxx-xxxx-xxxx, content: 'string'},
{id: 5, uuid: xxxx-xxxx-xxxx-xxxx, content: 'string'},
{id: 6, uuid: xxxx-xxxx-xxxx-xxxx, content: 'string'},
{id: 7, uuid: yyyy-yyyy-yyyy-yyyy, content: 'string'},
{id: 8, uuid: zzzz-zzzz-zzzz-zzzz, content: 'string'}
]

And i'm trying to find a simple way for making this in result :

const x = [xxxx-xxxx-xxxx-xxxx, yyyy-yyyy-yyyy-yyyy, zzzz-zzzz-zzzz-zzzz]

I know it's maybe basic but my brain is off i guest ...

Thanks !

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try this, but i used a string type for uuid:

[...new Set(x.map(e => e.uuid))].sort()
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda