Comparing version 1.0.1 to 1.0.2
{ | ||
"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" | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2985
6
54
1