Alert might not work by one of the following reasons:
data.items is empty; then the function in the
$.each loop is never called;
data is undefined; then the exception is thrown when you try to dereference it by getting
data.items; so the rest of the script's call stack is skipped; note that unhandled exceptions are not shown;
- the function in the loop is called but exception is thrown inside it.
To find out which case takes place you can use the step-by-step debugging or handle exceptions and provide test output.