[jQuery] Adding items to the json result of the autocomplete plugin
I am using the tokenizing autocomplete text entry which expects the
search result in json format
I want to know if it's possible to add items to the json collection
using jquery, if I have for example
var results = [{"id":"1","name":"Abb"}, {"id":"2","name":"Abbas"},
{"id":"3","name":"Abd"}, {"id":"4","name":"Abdel"}]
and
function xxx(id, value)
{
// add id/value pair to results
}
How can I do this?
Thanks in advance