Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

ksxnodeapps/json-property

Repository files navigation

json-property

Quickly manipulate JSON files

Installation

npm install --global json-property

Command-line usage

Print JSON content

get-json-property file.json property_name_1 property_name_2 property_name_3
get-json-property property_name_1 property_name_2 property_name_3 < file.json
cat file.json | get-json-property property_name_1 property_name_2 property_name_3

Modify JSON content

set-json-property value file.json property_name_1 property_name_2 property_name_3
set-json-property value property_name_1 property_name_2 property_name_3 < input.json > output.json
cat input.json | set-json-property value property_name_1 property_name_2 property_name_3 > output.json