Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

211
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda