I'm using jquery-ui plugin, what I'm trying to accomplish is to use an array of pair values (Key and label value) as the source for an autocomplete text input.
My array looks like:
var valuesArray = [{
label: 'Name_1',
key: 1
}, {
label: 'Name_2',
key: 2
}, {
label: 'Name_3',
key: 3
}, {
label: 'Name_4',
key: 4
}];
I need the label attribute to appear in the text input while getting the key attribute when retrieving the input text element value.
Thanks in advance