baconjs / bacon.js

Functional reactive programming library for TypeScript and JavaScript
https://baconjs.github.io
MIT License
6.47k stars 330 forks source link

J Query Cannot read property 'label' of undefined #763

Closed susritha22 closed 4 years ago

susritha22 commented 4 years ago

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"] + '" >'

raimohanska commented 4 years ago

How is this related to Bacon.js?

susritha22 commented 4 years ago

Oops wrongly submitted.sorry