json-extract

Extract JSON values from a JSON file.

npm install json-extract
6 downloads in the last week
25 downloads in the last month

json-extract

Use Node.js to extract JSON values from a JSON file.

NPM

Build Status Dependency Status

Usage

json-extract --file path/to/a/json/file --key THE_KEY  # will return the value associated with THE_KEY

Nested keys are allowed:

  • --key some.nested.value: will access nested objects.
  • --key an_array.5: will access an array like an_array[5].
  • --key some.nested.array.5: will access the 5th entry in an array that is nested in objects.

Installation

npm install -g json-extract
// install globally

Test

make test

License

MIT

npm loves you