I have some javascript as shown below
for (var titleKey in data.d) {
var title = data.d[titleKey];
}
This is actually coming back from a JQuery call to a .NET webservice but I don't believe that's related.
My loop iterates over each element in the collection correctly, it then continues through the loop one more time. The titleKey here is 'indexof' and title is 'undefined'.
This is happening in two different places in my code.
What is causing this? How can I prevent it?
Thanks in advance.