read-json-value
v1.0.2
Published
Read a value from a JSON file
Maintainers
Readme
READ JSON VALUE
This is a simple Node.js module to read a JSON value from a file. I created this module because I needed to read a JSON value from a file from the CLI. I couldn't find a module that did this, so I created one. This module has no dependencies, and is very small.
Installation
npm i -g read-json-valueUsage
read-json-value <file> <jsonpath>Arguments
file
The path to the JSON file.
jsonpath
The JSON path to the value you want to read. This could be a simple key, or a path to a nested value (e.g. scripts.test or dependencies.react in a package.json file)
Example
read-json-value package.json version
