From: Nicolas Williams Date: Sat, 27 Jun 2015 02:18:58 +0000 (-0500) Subject: Document `{$var}` X-Git-Tag: jq-1.5rc2~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a220482de610cc4bb65a1f00526af32371cc49dd;p=jq Document `{$var}` --- diff --git a/docs/content/3.manual/manual.yml b/docs/content/3.manual/manual.yml index 1092b3b..1fbf392 100644 --- a/docs/content/3.manual/manual.yml +++ b/docs/content/3.manual/manual.yml @@ -2190,6 +2190,9 @@ sections: with `$x` set to that value. Thus `as` functions as something of a foreach loop. + Just as `{foo}` is a handy way of writing `{foo: .foo}`, so + `{$foo}` is a handy way of writing `{foo:$foo}`. + Multiple variables may be declared using a single `as` expression by providing a pattern that matches the structure of the input (this is known as "destructuring"):