I'm getting data with ajax, and the result can be either array of results or a string statement like "no results found". How can i tell whether i got any results or not? i tried this approach:
if result == String
do something
but its not working, just like
if typeof(result) == "string"
do something
Is there any other function that can help me get the type of the variable? Or maybe i can test it for Array type, it would also be very helpful