JSFiddle - React, Tailwind, and code Playground
HTML
<textarea rows=4 id="mytextarea">John.2
Jane.3
John.4
Jane.5</textarea>
<br>
<button onclick="parseText()">Parse</button>
JavaScript
function parseText() {
var textAreaValue = document.getElementById("mytextarea").value;
//textAreaValue = textAreaValue.replace(/\s/g, ""); //remove white space
var rows = textAreaValue.replace(/\r\n/g, "\n").split("\n");
alert(rows);
}