JSFiddle - React, Tailwind, and code Playground

HTML

<input type='text' />

JavaScript

var json = ["JOAQUIN", "BERNARDINO", "MODOC","ALASKA","MADERA", "ANDERSON", "Kingston","Kala","Aka"];
json.sort();


$('input').autocomplete({
  source: function( request, response ) {
    var matches = $.map( json, function(json) {
      if ( json.toUpperCase().indexOf(request.term.toUpperCase()) === 0 ) {
        return json;
      }
    });
    response(matches);
  }
});