Skip to content

Commit

Permalink
Update website
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 20, 2024
1 parent 5015cf3 commit 8cbe7ed
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions manual/dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2855,15 +2855,17 @@ <h3>
</section>
<section id="add">
<h3>
<code>add</code>
<a href="#add" class="icon-link" aria-label="Link to this section: `add`"><span class="bi bi-link-45deg" aria-hidden="true"></span></a>
<code>add</code>, <code>add(generator)</code>
<a href="#add" class="icon-link" aria-label="Link to this section: `add`, `add(generator)`"><span class="bi bi-link-45deg" aria-hidden="true"></span></a>
</h3>
<p>The filter <code>add</code> takes as input an array, and produces as
output the elements of the array added together. This might
mean summed, concatenated or merged depending on the types
of the elements of the input array - the rules are the same
as those for the <code>+</code> operator (described above).</p>
<p>If the input is an empty array, <code>add</code> returns <code>null</code>.</p>
<p><code>add(generator)</code> operates on the given generator rather than
the input.</p>
<div class="pb-3">
<button type="button" class="btn btn-sm btn-secondary text-body-secondary bg-transparent link-body-emphasis border-0" data-bs-toggle="collapse" data-bs-target="#example36" aria-expanded="false" aria-controls="example36">
<span class="me-1 d-print-none" aria-hidden="true"><span class="bi bi-chevron-right"></span><span class="bi bi-chevron-down"></span></span>Examples
Expand Down Expand Up @@ -2923,6 +2925,24 @@ <h3>
<td></td>
</tr>
</table>
<table class="table table-borderless table-sm w-auto">
<tr>
<th class="pe-3">Command</th>
<td class="font-monospace">jq 'add(.[].a)'</td>
</tr>
<tr>
<th>Input</th>
<td class="font-monospace">[{&#34;a&#34;:3}, {&#34;a&#34;:5}, {&#34;b&#34;:6}]</td>
</tr>
<tr>
<th>Output</th>
<td class="font-monospace">8</td>
</tr>
<tr class="d-print-none">
<th><a href="https://jqplay.org/jq?q=add%28.%5B%5D.a%29&j=%5B%7B%22a%22%3A3%7D%2C%20%7B%22a%22%3A5%7D%2C%20%7B%22b%22%3A6%7D%5D" class="btn btn-outline-primary btn-sm" target="_blank" rel="noopener">Run<span class="bi bi-box-arrow-up-right ms-2" aria-hidden="true"></span></a></th>
<td></td>
</tr>
</table>
</div>
</div>
</section>
Expand Down Expand Up @@ -8339,7 +8359,7 @@ <h2>Colors <a href="#colors" class="icon-link" aria-label="Link to this section:
"halt_error, halt_error(exit_code)": "halt_error",
"$__loc__": "$__loc__",
"paths, paths(node_filter)": "paths",
"add": "add",
"add, add(generator)": "add",
"any, any(condition), any(generator; condition)": "any",
"all, all(condition), all(generator; condition)": "all",
"flatten, flatten(depth)": "flatten",
Expand Down

0 comments on commit 8cbe7ed

Please sign in to comment.