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

202
Views
How to convert a long line of json data into multiple and readable lines

EDIT !

I've found my answer on here so go there if you think you have the same problem !

My original question :

So recently I've been using the fs module to try creating my new json database and it succesfully worked ! This is the json file I had at first.

{
  "name":"Jake",
  "gender":"Male"
}

The problem is that when using fs.writeFile on my file for adding a new property. The file looks like this :

{"name":"Jake","gender":"Male","hobby":"art"}

This is really annoying as I have to use a website to edit my json data to automatically add the spaces and new lines. My question is that is it possible (and how) to automatically edit my file to become readable again after editing it ?

about 4 years ago · Juan Pablo Isaza
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!