Synchronous version of saveAsJson
Data to save as JSON
Path to save the JSON file
Configuration options
void
const { saveAsJsonSync } = require('./json-save');const data = [{ id: 1, name: 'John' }, { id: 2, name: 'Jane' }];saveAsJsonSync(data, './output.json', { prettyPrint: true }); Copy
const { saveAsJsonSync } = require('./json-save');const data = [{ id: 1, name: 'John' }, { id: 2, name: 'Jane' }];saveAsJsonSync(data, './output.json', { prettyPrint: true });
Synchronous version of saveAsJson