commit
46814da91a
1 file changed
+1
-1
@@ -1040,7 +1040,7 @@ sections:
|
||||
If you want the value-argument behaviour for defining simple
|
||||
functions, you can just use a variable:
|
||||
|
||||
def addvalue(f): f as $value | map(, + $value);
|
||||
def addvalue(f): f as $value | map(. + $value);
|
||||
|
||||
With that definition, `addvalue(.foo)` will add the current
|
||||
input's `.foo` field to each element of the array.
|
||||
|
||||
Reference in new issue
Block a user