Skip to content

Commit

Permalink
Merge pull request #72 from ne0zen/master
Browse files Browse the repository at this point in the history
DOCS: fix wrong flag for conditional formatting
  • Loading branch information
trentm committed Jun 9, 2014
2 parents b021665 + 48b48f0 commit 349a245
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/json.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/json.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ or more slower for large inputs. See the [COMPATIBILITY][] section below.

## FEATURE: Conditional filtering

Use the `-e CODE` option to run JavaScript code ending with a statement
Use the `-c CODE` option to run JavaScript code ending with a statement
returning a boolean to filter the input JSON.

$ echo '[{"age":38},{"age":4}]' | json -e 'this.age > 21'
$ echo '[{"age":38},{"age":4}]' | json -c 'this.age > 21'
[{"age":38}]

As with `-e` above, if input is an array, this will automatically process each
Expand Down
6 changes: 3 additions & 3 deletions man/man1/json.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "JSON" "1" "May 2014" "" "json tool manual"
.TH "JSON" "1" "June 2014" "" "json tool manual"
.
.SH "NAME"
\fBjson\fR \- JSON love for your command line
Expand Down Expand Up @@ -322,13 +322,13 @@ The given CODE is executed in a function bound to the input object (i\.e\. \fBth
\fICompatibility note:\fR In versions before v9 \fB\-e CODE\fR used an alternate implementation (with slightly different semantics for the CODE)\. It is still supported for backward compatibility by using the \fBJSON_EXEC=vm\fR environment variable\. However it is deprecated because it can cause processing to be \fI10x\fR or more slower for large inputs\. See the \fICOMPATIBILITY\fR section below\.
.
.SH "FEATURE: Conditional filtering"
Use the \fB\-e CODE\fR option to run JavaScript code ending with a statement returning a boolean to filter the input JSON\.
Use the \fB\-c CODE\fR option to run JavaScript code ending with a statement returning a boolean to filter the input JSON\.
.
.IP "" 4
.
.nf

$ echo \'[{"age":38},{"age":4}]\' | json \-e \'this\.age > 21\'
$ echo \'[{"age":38},{"age":4}]\' | json \-c \'this\.age > 21\'
[{"age":38}]
.
.fi
Expand Down

0 comments on commit 349a245

Please sign in to comment.