From b5762bef22ed46659b7c64c64cfdcca88a84e9cd Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Sun, 2 Dec 2018 22:25:56 +0700 Subject: [PATCH] Update README.md --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fd34cdc..9f73ffe 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,21 @@ $ curl ... | fx .message ``` Pass any numbers of arguments as code. +```bash +$ curl ... | fx 'json => json.message' 'json => json.filter(x => x.startsWith("a"))' +``` + +Access all lodash (or ramda, etc) methods by using [.fxrc](https://github.com/antonmedv/fx/blob/master/docs.md#using-fxrc) file. +```bash +$ curl ... | fx '_.mapValues(_.groupBy(this, "commit.committer.name"), _.size)' ``` -curl ... | fx 'json => json.message' 'json => json.filter(x => x.startsWith("a"))' + +Update JSON using spread operator. +```bash +$ echo '{"count": 0}' | fx '{...this, count: 1}' +{ + "count": 1 +} ``` ## Documentation