I am using jQuery UI autocomplete, Now in the hidden field I am trying to manage the ids of the item selected,
For example, consider this is the data set I have, [Apple:1, Mango:2, Coconut:3, Apple:4]
Now if I type hello it should print hello to hidden field now if I trigger autocomplete and select Apple from it hidden field should be hello [Apple:1]
So far all good, but if I delete e from apple from the main textbox hidden field should hold
hello appl , It should also allow to have multiple entries with same name (as shown here with 2 entries of apple)
I managed it with a map data structure so if I select
abcI will add it into map{abc, 1}now on change I am splitting it by space and I see if the word belongs to map if yes then replace it with its value