node-json-file
This is node runtime json file tool.
install:
npm install --save node-json-file
select attribute
const jsonTool = ; let jsonTest = ; jsonTest; // 查找全部属性jsonTest;
update attribute
Updated after the json object does not really save the original file, need to invoke the sava method to
save()
another.
const jsonTool = ; let jsonTest = ; jsonTest; // update one attrjsonTest;
delete attribute
const jsonTool = ; let jsonTest = ; jsonTest;
get all attribute number
const jsonTool = ; let jsonTest = ; jsonTest;
save json object
const jsonTool = ; let jsonTest = ; jsonTest; // save original filejsonTest;
find json object
const jsonTool = ; let jsonTest = ; jsonTest;// if not find key, return undefined