Depending on the web service response you can split the content by carriage return (\r) or line feed (\n). or both like I did in my example.
var responseArray = StringUtils.splitByWholeSeparator(wsResponseContent, '\r\n');
for (var i=0 ; i < responseArray.length ; i++) {
messageCache.setValue('key'+i, responseArray[i]);
}