Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

365
Views
How can I read .dat file in node.js and convert to human-readable text/json

I have a .dat file that contains information that is not clear to read it.

So, I was trying to read that file and convert it to human-readable text/json.

I implemented this code but don't know how to convert readable text/json file.

 fs.readFile('./2.dat', 'utf8', (err, data) => {
    if (err) throw err
    console.log(data)
  })

This is the file 2.dat

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your file looks like some kinf of CSV with | as a delimiter. YOu need to use some package to parse CSV like csv-parse to get lines as JS-objects.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!