Skip to content
/ jpath Public

CLI command to query JSON documents using jsonpath (xpath for JSON).

Notifications You must be signed in to change notification settings

cGuille/jpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jpath

CLI command to query JSON documents using jsonpath (xpath for JSON).

Install

Using npm:

npm install --global cGuille/jpath

Usage

Query a JSON file

# Using the -f option:
jpath -f document.json [jsonpath query]

# Using standard input redirection:
jpath [jsonpath query] < document.json

Query a JSON document from another command

command-writing-json-to-stdout |jpath [jsonpath query]

Example

echo '[ { "name": "John Doe", "age": 53 }, { "text": "dummy" }]' |jpath '$..name'
#-> [ 'John Doe' ]

About

CLI command to query JSON documents using jsonpath (xpath for JSON).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published