I have this jQuery below:
$.getJSON('../GetCities?', { term: inputString }, function (data) {
var anchorTagElements = '';
console.log("line 39 ");
$.each(data.items, function (i, item) {
console.log("line 41 " );
anchorTagElements = anchorTagElements + '<a href=""><span class="searchheading">' +
item.City + ', </span></a>';
});
});
I can see the data is coming back from the server using firebug I can see the line 39 is printed to the log but line 41 is not meaning it failed right before the line 41 console.log
Error message I am getting is TypeError: e is undefined
any ideas where to look at?
EDIT
Using jQuery non-minified I got:
TypeError: obj is undefined
length = obj.length,
It is failing while trying to get the length to evaluate i
. I am not sure why I can see the data coming back correctly.
Here is the Data that comes back: