Looking to convert this list into an array so that I can access it on the client side with JS and loop through its values.
At the end of one of my .ashx methods, a list is returned like this:
equipmentTypes is a list of strings
_httpContext.Response.ContentType = "text";
_httpContext.Response.Write(equipmentTypes.ToArray());
However, when I receive it on the client side, all I get is the text "System.String[]". This is obviously not correct. What content type should I be returning instead?
I assume I can then evaluate this into an array (object) on the JavaScript side.