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

145
Vistas
display array value in select box in JavaScript

Can you actually display array value in the <select> but not in the option list ? What I mean here is assuming I already read the value from the API, and I want to retrieve it and displayed it like in this expected output.

Expected output

But with my code I got it like this.

I want to display all 3 value in the highlighted area. Is that possible to do so ? my output


 let staff_assign= '';
   e.staff_user.assign.map((e) => {
      staff_assign+= `<option value="${e.staff_id }">${e.staff_name}</option>`;
 });

----------------------------------------------------------
<div class="form-control-wrap">
  <select id="getStaff" multiple="multiple">
    ${staff_assign}
  </select>
</div>


Just explanations will do.

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

0

use can use this lightweight component to implement easily this tag input

https://github.com/yairEO/tagify

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