Socket
Socket
Sign inDemoInstall

jsonfilter

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonfilter - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

collaborators.md

2

package.json
{
"name": "jsonfilter",
"version": "1.0.1",
"version": "1.0.2",
"bin": {

@@ -5,0 +5,0 @@ "jsonfilter": "cli.js"

@@ -23,24 +23,32 @@ # jsonfilter

some examples:
**some examples:**
`rows.*` matches any child elements of `rows`, e.g.:
`"name"` matches the key `name` in an object and returns the value.
```BASH
$ echo '{ name: "foo", type: "bar"}, { name: "foobar", type: "barfoo"}' | jsonfilter "name"
# "foo"
# "foobar"
```
`"rows.*"` matches any child elements (items inside the array) of `rows`, e.g.:
```BASH
$ echo '{"rows": [ {"this object": "will be matched"}, {"so will": "this one"} ]}' | jsonfilter "rows.*"
{"this object": "will be matched"}
{"so will": "this one"}
# {"this object": "will be matched"}
# {"so will": "this one"}
```
`rows.*.doc` matches all children of `rows` with key `doc`, e.g.:
`"rows.*.doc"` matches all children of `rows` with key `doc`, e.g.:
```
```BASH
$ echo '{"rows": [ {"doc": {"this object": "will be matched"}, "foo": "bar"} ]}' | jsonfilter "rows.*.doc"
{'this object': 'will be matched'}
# {'this object': 'will be matched'}
```
`rows..doc` recursively matches all children of `rows` and emits all with key `doc`, e.g.:
`"rows..doc"` recursively matches all children of `rows` and emits all with key `doc`, e.g.:
```
```BASH
$ echo '{"rows": [ {"foo": {"bar": {"baz": {"taco": {"doc": "woo"}}}}} ]}' | jsonfilter "rows..doc"
"woo"
# "woo"
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc