abc.txt
John 22-08-1998 Bangalore 1111111111
const k;
this.k = sessionStorage.getItem('loggedUser');
if (k.UpperCase() === 'MEGHANA') {
const fs = require('fs')
const text = fs.readFileSync('./MEGHANA.txt').toString('utf-8')
const textByLine = text.split('\n')
document.write(textByLine[0])
}
const textByLine = text.split('\n')gives you the whole line which you'd like to parse in to an array?