culver, смотрите что у вас не так ...для теста пишем
or выбираем
orange вставляется
l_25
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>autocomplete demo</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
</head>
<body>
<label for="autocomplete">Select: </label>
<input id="userSearch">
<script>
var data = [{"label":"orange","id":"l_25"},{"label":"apple","id":"l_38"},{"label":"banana","id":"l_44"}];
$( "#userSearch" ).autocomplete({
source: function( request, response ) {
response($.map(data, function(item) {
return {
label: item.label,
value: item.id
}
}))
},
minLength: 2,
cache: false
});
</script>
</body>
</html>