html
Click
jquery
You are placing a string into a jQuery object. Just use the item instead:
item
$('button').click(function(){ var arrayOfLines = $('#gps').val().split('\n'); $.each(arrayOfLines, function(index, item) { console.log(item); }); });