Skip to content Skip to sidebar Skip to footer

Getjson Typerror E Is Undefined

I have this jQuery below: $.getJSON('../GetCities?', { term: inputString }, function (data) { var anchorTagElements = ''; console.log('line 39 '); $.each(data.ite

Solution 1:

$.each(data, function (i, item) {  
            anchorTagElements = anchorTagElements + '<ahref=""><spanclass="searchheading">' +
                item.City + ', </span></a>';
});

Solution 2:

Try:

$(data.items).each(function (i, item) {

Also, try printing data to see if it is valid.

Post a Comment for "Getjson Typerror E Is Undefined"