New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

simple-jsonpath

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-jsonpath

Simpler & lighter version of dchester's JSONPath

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

simple-jsonpath

Query JavaScript objects with JSONPath expressions. Robust / safe JSONPath engine for Node.js.

This is a fork from jsonpath. Please, go to the original README to get a full documentation.

The main goal of this fork is to reduce the jsonpath bundle size from 83.7KB to 38.3KB by getting rid of some expression/script rules.

Concretely, I removed script expression and filters:

JSONPathDescription
$.store.book[*].authorThe authors of all books in the store
$..authorAll authors
$.store.*All things in store, which are some books and a red bicycle
$.store..priceThe price of everything in the store
$..book[2]The third book
$..book[(@.length-1)]The last book via script subscript
$..book[-1:]The last book via slice
$..book[0,1]The first two books via subscript union
$..book[:2]The first two books via subscript array slice
$..book[?(@.isbn)]Filter all books with isbn number
$..book[?(@.price<10)]Filter all books cheaper than 10
$..book[?(@.price==8.95)]Filter all books that cost 8.95
$..book[?(@.price<30 && @.category=="fiction")]Filter all fiction books cheaper than 30
$..*All members of JSON structure

License

MIT

Keywords

JSONPath

FAQs

Package last updated on 07 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts