Какой смысл делать это:
var resultsArray = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d;
внутри onSuccess () обратного вызова $. (Ajax) вызова?
var resultsArray = /* assign a value to resultsArray... */ (typeof response.d) == 'string' ? /* ...if the type of response.d is string */ eval('(' + response.d + ')') : /* ...then evaluate it as if it was JS code */ response.d; /* ...else just assign it unaltered */