You can do it that way using the Rich/EditControl or a ListBoxControl. The ListBoxControl would be a better method for this however for the Rich/EditControl you can read the string and split the string on \n which would then cause the string to be converted to an array where each line would be a slot in the array.
For instance
js code:
var str = 'this\nis\nsome\ntext';
Debug.Trace(str);
var array = str.split('\n');
Debug.Trace('the length of the array is: '+array.length);
for (var a in array) Debug.Trace('Array position ('+a+') contains the data: '+array[a]);