I have one search box ,in that search json data should append.
here is my html code
<input type="search" id="merchantName" name="merchant" placeholder="enter merchant name"></input>
I have json data which contains merchant name. I want to append this merchant name on this search box in list form.how can I do..?this is my js function but here data is not appended in search box.
$(responseObj.merchants).each(function() {
var output = "<ul><li>" + this.merchantName + " " +"</li></ul>";
$('#list').append(output);
});
#list
??? Please improve your question, posting more of relevant code. What about a jsfiddle? BTW, you should use$.each()
not$.fn.each()
– A. Wolff 19 hours ago