Amit Singh Bhardwaj Amit Singh Bhardwaj - 8 days ago 4
reST (reStructuredText) Question

autocomplete from rest api

I'm using autocomplete function for auto suggetion and I'm using the rest api url as a data source but it is suggesting the all label for example if I enter

so it should display only that label which contain
but it is displaying all the label even when I type any keyword it is showing the all label here is my input text

<input type="text" id="name" />
<input type="text" id="value" />

here is my java script and jquery

dataType: "json",
select: function (event, ui) {
return false;

and the
contain the following data



I guess you need something like this:

 $.getJSON("http://localhost:8080/JsonRestfull/countries", function(data) {
  $( "#name" ).autocomplete({
     source: data    

I hope, It will help.