Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!