ORESoftware / modify.json

Modify .json files using shell tools.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@oresoftware/modify.json

This is a command line tool to modify subproperties on disk or write to stdout.

install: npm install -g @oresoftware/modify.json

Usage

modify.json 'the.nested.prop.you.want.to.modify'

By default this writes the JSON.stringify result to stdout. To modify the file on disk, use:

--disk

To change the value to a boolean, use:

modify.json <file> <prop> true
modify.json <file> <prop> 'true'
modify.json <file> <prop> false
modify.json <file> <prop> "false"

To change the value to an empty string, use:

modify.json <file> <prop> '""'

To change to the string "true"

modify.json <file> <prop> '"true"'

About

Modify .json files using shell tools.

License:MIT License


Languages

Language:JavaScript 32.1%Language:TypeScript 30.0%Language:Dockerfile 21.3%Language:Shell 16.6%