Skip to content

ZitronenbonbonX/read-json-value

Repository files navigation

NPM

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-value

Usage

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

About

Little CLI Script to parse JSON-File and read some value by given Path from it

Resources

License

Stars

Watchers

Forks

Packages

No packages published