Need help in JS

Hello everyone , I am a java not JS person , but i need help in JS
Im using jqurry lib to achieve autocomplete functionality and it work great
but I need another input will just view what in between the parenthesis of the autocomplete value after user select one ofc

$( function() {
    var availableTags = [
    "Acura (ACUR)", 
    "Alfa Romeo (ALFA)", 
    "AM General (AMGN)", 
    "American Motors (AMER)", 
    "Aston Martin(ASTO)", 
    $( "#tagsModel" ).autocomplete({source: available});
  } ); 

so like after user select ‘Acura’ , I need what between the parenthesis as output in another TextField or whatever

but the between parenthesis I need it in different inputField

May I ask why you don’t use the Java Vaadin ComboBox component to have auto completion feature?

I have done it in java but i was hoping to make it work in javascript

I can’t understand the reason to do it in Javascript, but you of course will now :slightly_smiling_face:
Anyway, it is a very long time I don’t use jquery, but I recall source could be an object with label and value properties

Edit: an array of objects

Its simple for me using java but we learning JavaScripts these days

Why dont you use the vaadin-combo-box web component?

Is it not supposed to be source: availableTags instead of source: available? if you want to copy selected value into another element, you can probably provide a callback function for autocompleteselect event and act accordingly. However, I would like to remind you that this forum is intended for Vaadin-related questions, and this particular question is not related to the Vaadin framework.

But in anyway when someone will try to view the page source code

They can see pretty much everything