Skip to main content

writeJSON

Writes an object as JSON to a file.

  • import the method
import { writeJSON } from "nodelpers";
  • params
path: string;
data: any; // all supported json type
  • usage
let path = "/path/to/your/file.json";
writeJSON(path);