delete-fields-json-file
v1.0.2
Published
> Delete fields from JSON Array
Downloads
3
Readme
delete-fields-json-file
Delete fields from JSON Array
Install
npm install delete-fields-json-file
Usage
import deleteFieldsFromObjects from './index.js';
deleteFieldsFromObjects('foo/bar.json', ['field1']);
deleteFieldsFromObjects('foo/bar.json', ['field1', 'field2', 'field3']);
API
deleteFieldsFromObjects(filePath, fieldsToDelete)
filePath
Type: string
The json array file path whose fields needs to be deleted.
fieldsToDelete
Type: string[]
The fields to deleted.