We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fee38af + 115552f commit 88a6dc5Copy full SHA for 88a6dc5
docs/content/3.manual/manual.yml
@@ -972,10 +972,11 @@ sections:
972
973
.realnames as $names | .posts[] | {title, author: $names[.author]}
974
975
- The expression "foo as $x" runs foo, puts the result in $x,
976
- and returns the original input. Apart from the side-effect
977
- of binding the variable, it has the same effect as ".".
978
-
+ 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.
979
+
980
Variables are scoped over the rest of the expression that defines
981
them, so
982
0 commit comments