You could try this function :
function textToArray(){
var someArray = [];
var nameList = $("#txtArea").val();
$.each(nameList.split(/\n/), function (i, name) {
// empty string check
if(name != ""){
someArray.push(name);
}
});
taken from : CONVERT TEXTAREA CONTENT TO AN ARRAY USING JQUERY