Autocomplete Input Field

Hi,

I am reviving this thread as I am trying to do an autocomplete input field that reads from a server connect.

I tried the solution of @patrick here: We need a auto complete is very used however, the datalist does not look good on Safari as it does not scale with the width of the input field.

Hence, I am trying to use the autocomplete script of Jquery-UI https://jqueryui.com/autocomplete/ but given my limited knowledge of javascript I would like to know how I can populate var availableTags in the below with a list of multiple entries {{serverconnect1.data.query1.data.label}} from AppConnect. Please note that the extract below is under<body>

<script>
  $( function() {
    var availableTags = [
            "ActionScript",
            "AppleScript",
            "Java"
    ];
    $( "#tags" ).autocomplete({
      source: availableTags
    });
  } );
  </script>

Thank you