We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
as
1 parent 925ec37 commit 115552fCopy full SHA for 115552f
docs/content/3.manual/manual.yml
@@ -953,10 +953,11 @@ sections:
953
954
.realnames as $names | .posts[] | {title, author: $names[.author]}
955
956
- The expression "foo as $x" runs foo, puts the result in $x,
957
- and returns the original input. Apart from the side-effect
958
- of binding the variable, it has the same effect as ".".
959
-
+ The expression `exp as $x | ...` means: for each value of expression
+ `exp`, run the rest of the pipeline with the entire original input, and
+ with `$x` set to that value. Thus `as` functions as something of a
+ foreach loop.
960
+
961
Variables are scoped over the rest of the expression that defines
962
them, so
963
0 commit comments