Little modification to this script

Hello everyone, I got this script:

var xhr = new XMLHttpRequest();
xhr.open("GET","data/File.txt",false);
xhr.send(null);
var fileContent = xhr.responseText;
$gameVariables.setValue(4952, fileContent);

This script reads text files and loads them into variable 4952.
Now if the content of the File.txt is

Line 1: Some cool text you know
Line 2: Another cool text

Is there a way to filter which line number it should load?
No, there isn't a way to filter which line it should load. How do you want to cut an apple into two halves when you don't know how huge the apple is or where the middle is? In other words How can a software load only a portion of the file when it doesn't even know what portion of the file it needs to load, because in order to exactly determine a portion of something it needs to know its exact size which can only be found by loading whole file? The answer is simple, it can't.
However, the file contents are a string. And since next line is coded as \n, I'm sure you can manipulate that so it returns only the second line. I'm not going to tell you how, this is a basic string manipulation.

Original thread: https://forums.rpgmakerweb.com/threads/little-modification-to-this-script.89332/