I got the data and it went inside success function of jQuery.
Getting the below error:
jquery-ui.js?_=1591636436303:6075 Uncaught TypeError: Cannot read property 'label' of undefined
at $...normalize (jquery-ui.js?=1591636436303:6075)
at $...normalize (jquery-ui.js?=1591636436303:144)
at $...response (jquery-ui.js?_=1591636436303:6035)
at $..._response (jquery-ui.js?=1591636436303:144)
at $...superApply (jquery-ui.js?=1591636436303:133)
at $...response (jquery-ui.js?_=1591636436303:6225)
at $..._response (jquery-ui.js?=1591636436303:144)
at $... (jquery-ui.js?_=1591636436303:6023)
at proxy (jquery-1.12.4.js:529)
at Object.success ((index):584)
var arr=['1700000','1700001','1700002']; var suggest = function(request, response) { $.ajax({ type: "POST", url: suggestUri, dataType: "json", headers: { "api-key": "{{ searchServiceApiKey }}", "Content-Type": "application/json" }, data: JSON.stringify({ top: {{ searchResultsPerPage }}, select: "articlepublicnumber,Id,title,new_brandmultiselectstring", filter: "(statuscode eq 7 and statecode eq 3)", suggesterName: "{{ searchSuggestorName }}", search: request.term, highlightPreTag: highlightPreTag, highlightPostTag: highlightPostTag }), open: function(event, ui) { $(".ui-autocomplete").hide(); }, success: function(data) { if (data.value && data.value.length > 0) { response(data.value.map(function (x) { $.each(arr, function (index, value) { if(x["@search.text"].indexOf("KA") >= 0 && x.new_brandmultiselectstring.indexOf(value)>=0){ return '<a class="underline" title="' + x["articlepublicnumber"] + ' - ' + x["title"] + '" href="/knowledgebase/article/' + x["articlepublicnumber"] + '/en-us?highlight=' + x["title"] + '" >'
x["articlepublicnumber"] + ' - ' + x["title"] + '';
I got the data and it went inside success function of jQuery. Getting the below error: jquery-ui.js?_=1591636436303:6075 Uncaught TypeError: Cannot read property 'label' of undefined at $...normalize (jquery-ui.js?=1591636436303:6075)
at $...normalize (jquery-ui.js?=1591636436303:144)
at $...response (jquery-ui.js?_=1591636436303:6035)
at $..._response (jquery-ui.js?=1591636436303:144)
at $...superApply (jquery-ui.js?=1591636436303:133)
at $... response (jquery-ui.js?_=1591636436303:6225)
at $..._response (jquery-ui.js?=1591636436303:144)
at $... (jquery-ui.js?_=1591636436303:6023)
at proxy (jquery-1.12.4.js:529)
at Object.success ((index):584)