import fs from "fs" ; const data = JSON . parse ( fs . readFileSync ( "./data.json" , "utf-8" ) ) ; fs . writeFileSync ( "data-formatted.json" , JSON . stringify ( data , null , "\t" ) ) ; console . info ( "OK" ) ;