Dear I would like to show a message of results not found if the search criterion is not found in the JSON file, I leave the code that I have where I can add that line of code is a message of no results if no search is found I hope I understand you and thank you
function Cargardata(count) {
var searchField = $('#search').val();
var myExp = new RegExp(searchField, 'i');
$.getJSON('/books-schema.json', function(data) {
var output = '<ul id="resultado">';
var dataCounter = 0;
$.each(data.data, function(i, item) {
if ((dataCounter < count) && ((item.title.search(myExp) != -1) || (item.teaser.search(myExp) != -1))) {
output += '<li>';
output += '<span class="image"><img src=' + item.image + '/></span>';
output += '<span class="title">' + '<h3>' + item.title + '</h3>' + '</span>';
output += '<span class="description">' + '<p>' + item.teaser + '</p>' + '</span>';
output += '</li>';
dataCounter +=1;
}
});
output += '</ul>';
$('content').html(output);
});
}