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

119
Vistas
How to display an object of objects without repetitions on the site

The problem is this, I need to display a list of users in a modal window, but the problem is that the list of all names is constantly duplicated there, how can this be avoided? And to be equally visible to all users on the page Here is the code how it works:

const addUserToModalWindow = () => {
    const contentWindow = document.querySelector(".usersList");
    socket.on('users', (users) => {
        for (let user of Object.values(users)) {
            contentWindow.innerHTML += `<div>• ${user.name}</div>`;
        }
    });
};

Here are the photos of what is duplicated (there is no duplication on the second page, if you open the third, then duplication will be on the second and so on) enter image description here enter image description here

about 4 years ago · Juan Pablo Isaza
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