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

370
Views
cómo personalizar la salida de datos remotos select2 ajax

Quiero crear select2 con bandera de contenido, país de nombre y códigos de llamada. Tengo algunos problemas con mi código porque no puedo mostrar el resultado que quiero.

 var countriesList = "https://restcountries.com/v2/all"; $.ajax({ type: "GET", url: countriesList, dataType: "json", success: function (response) { $(".js-data-example-ajax").select2({ data: response.map((e) => ({ id: e.alpha2Code, text: e.name, })), width: 300, dropdownAutoWidth: true, }); }, error: function () {}, complete: function () {}, });

de esto ingrese la descripción de la imagen aquí

a esto ingrese la descripción de la imagen aquí

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