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

151
Views
recuperar la identificación de la mención.js en seleccionar

Estoy usando el ejemplo básico de mencionado.js

 $('textarea.mention-example2').mentionsInput({ onDataRequest:function (mode, query, callback) { $.getJSON('DataTableJsonFils/systmeQ.json', function(responseData) { responseData = _.filter(responseData, function(item) { return item.name.toLowerCase().indexOf(query.toLowerCase()) > -1 }); callback.call(this, responseData); }); } });

Tengo esta matriz json como datos para este ejemplo.

 [ { "id": 1, "name": "Kenneth Auchenberg", "avatar": "http://cdn0.4dots.com/i/customavatars/avatar7112_1.gif", "type": "contact" }, { "id": 2, "name": "Jon Froda", "avatar": "http://cdn0.4dots.com/i/customavatars/avatar7112_1.gif", "type": "contact" }, { "id": 3, "name": "Anders Pollas", "avatar": "http://cdn0.4dots.com/i/customavatars/avatar7112_1.gif", "type": "contact" }, { "id": 4, "name": "Kasper Hulthin", "avatar": "http://cdn0.4dots.com/i/customavatars/avatar7112_1.gif", "type": "contact" }, { "id": 5, "name": "Andreas Haugstrup", "avatar": "http://cdn0.4dots.com/i/customavatars/avatar7112_1.gif", "type": "contact" }, { "id": 6, "name": "Pete Lacey", "avatar": "http://cdn0.4dots.com/i/customavatars/avatar7112_1.gif", "type": "contact" }, { "id": 7, "name": "kenneth@auchenberg.dk", "avatar": "http://cdn0.4dots.com/i/customavatars/avatar7112_1.gif", "type": "contact" } ]

el filtro funciona bien. mi pregunta es ¿cómo puedo obtener el valor de identificación cuando selecciono un resultado del filtro y no el nombre? Me gustaría seguir filtrando el valor del nombre, pero al seleccionar mostrar la identificación

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!