summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Langford <wlangfor@gmail.com>2017-03-30 22:29:30 -0400
committerWilliam Langford <wlangfor@gmail.com>2017-03-30 22:29:30 -0400
commit950e414be670f26f149c85408d265458e8c9c347 (patch)
treed83bec86d700946a8d7d86e2adc2f0752ae8f576
parentc2b321fc86d4adf121378ca1d5744da905d2c4cc (diff)
Update docs
-rw-r--r--download/index.html2
-rw-r--r--manual/index.html1053
-rw-r--r--manual/v1.5/index.html8
-rw-r--r--sitemap.xml22
4 files changed, 735 insertions, 350 deletions
diff --git a/download/index.html b/download/index.html
index 35e7b67a..c44d1238 100644
--- a/download/index.html
+++ b/download/index.html
@@ -85,7 +85,7 @@
</li>
<li>
-<p>For Arch users, a PKGBUILD is in the <a href="https://aur.archlinux.org/packages/jq-git/">AUR</a>. Refer to the <a href="https://wiki.archlinux.org/index.php/Arch_User_Repository">ArchWiki</a> for how to install from AUR.</p>
+<p>jq 1.5 is in the official <a href="https://www.archlinux.org/packages/?sort=&q=jq&maintainer=&flagged=">Arch</a> repository. Install using <code>sudo pacman -Sy jq</code>.</p>
</li>
<li>
diff --git a/manual/index.html b/manual/index.html
index f692ecc5..974178db 100644
--- a/manual/index.html
+++ b/manual/index.html
@@ -164,7 +164,7 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
<li>
<p><code>--seq</code>:</p>
-<p>Use the <code>application/json-seq</code> MIME type scheme for separating JSON texts in jq’s input and output. This means that an ASCII RS (record separator) character is printed before each value on output and an ASCII LF (line feed) is printed after every output. Input JSON texts that fail to parse are ignored (but warned about), discarding all subsequent input until the next RS. This more also parses the output of jq without the <code>--seq</code> option.</p>
+<p>Use the <code>application/json-seq</code> MIME type scheme for separating JSON texts in jq’s input and output. This means that an ASCII RS (record separator) character is printed before each value on output and an ASCII LF (line feed) is printed after every output. Input JSON texts that fail to parse are ignored (but warned about), discarding all subsequent input until the next RS. This mode also parses the output of jq without the <code>--seq</code> option.</p>
</li>
<li>
@@ -263,12 +263,16 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
<p><code>-e</code> / <code>--exit-status</code>:</p>
<p>Sets the exit status of jq to 0 if the last output values was neither <code>false</code> nor <code>null</code>, 1 if the last output value was either <code>false</code> or <code>null</code>, or 4 if no valid result was ever produced. Normally jq exits with 2 if there was any usage problem or system error, 3 if there was a jq program compile error, or 0 if the jq program ran.</p>
+
+<p>Another way to set the exit status is with the <code>halt_error</code> builtin function.</p>
</li>
<li>
<p><code>--arg name value</code>:</p>
<p>This option passes a value to the jq program as a predefined variable. If you run jq with <code>--arg foo bar</code>, then <code>$foo</code> is available in the program and has the value <code>&quot;bar&quot;</code>. Note that <code>value</code> will be treated as a string, so <code>--arg foo 123</code> will bind <code>$foo</code> to <code>&quot;123&quot;</code>.</p>
+
+<p>Named arguments are also available to the jq program as <code>$ARGS.named</code>.</p>
</li>
<li>
@@ -292,6 +296,18 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
</li>
<li>
+<p><code>--args</code>:</p>
+
+<p>Remaining arguments are positional string arguments. These are available to the jq program as <code>$ARGS.positional[]</code>.</p>
+</li>
+
+<li>
+<p><code>--jsonargs</code>:</p>
+
+<p>Remaining arguments are positional JSON text arguments. These are available to the jq program as <code>$ARGS.positional[]</code>.</p>
+</li>
+
+<li>
<p><code>--run-tests [filename]</code>:</p>
<p>Runs the tests in the given file or standard input. This must be the last option given and does not honor all preceding options. The input consists of comment lines, empty lines, and program lines followed by one input line, as many lines of output as are expected (one per output), and a terminating empty line. Compilation failure tests start with a line containing only “%%FAIL”, then a line containing the program to compile, then a line containing an error message to compare to the actual.</p>
@@ -307,15 +323,15 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
<h2>Basic filters</h2>
- <section id=".">
+ <section id="Identity:.">
<h3>
-<code>.</code>
+Identity: <code>.</code>
</h3>
-<p>The absolute simplest (and least interesting) filter is <code>.</code>. This is a filter that takes its input and produces it unchanged as output.</p>
+<p>The absolute simplest filter is <code>.</code> . This is a filter that takes its input and produces it unchanged as output. That is, this is the identity operator.</p>
<p>Since jq by default pretty-prints all output, this trivial program can be a useful way of formatting JSON output from, say, <code>curl</code>.</p>
@@ -348,20 +364,24 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
</section>
- <section id=".foo,.foo.bar">
+ <section id="ObjectIdentifier-Index:.foo,.foo.bar">
<h3>
-<code>.foo</code>, <code>.foo.bar</code>
+Object Identifier-Index: <code>.foo</code>, <code>.foo.bar</code>
</h3>
<p>The simplest <em>useful</em> filter is <code>.foo</code>. When given a JSON object (aka dictionary or hash) as input, it produces the value at the key “foo”, or null if there’s none present.</p>
-<p>If the key contains special characters, you need to surround it with double quotes like this: <code>.&quot;foo$&quot;</code>.</p>
-
<p>A filter of the form <code>.foo.bar</code> is equivalent to <code>.foo|.bar</code>.</p>
+<p>This syntax only works for simple, identifier-like keys, that is, keys that are all made of alphanumeric characters and underscore, and which do not start with a digit.</p>
+
+<p>If the key contains special characters, you need to surround it with double quotes like this: <code>.&quot;foo$&quot;</code>, or else <code>.[&quot;foo$&quot;]</code>.</p>
+
+<p>For example <code>.[&quot;foo::bar&quot;]</code> and <code>.[&quot;foo.bar&quot;]</code> work while <code>.foo::bar</code> does not, and <code>.foo.bar</code> means <code>.[&quot;foo&quot;].[&quot;bar&quot;]</code>.</p>
+
<div>
@@ -419,10 +439,10 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
</section>
- <section id=".foo?">
+ <section id="OptionalObjectIdentifier-Index:.foo?">
<h3>
-<code>.foo?</code>
+Optional Object Identifier-Index: <code>.foo?</code>
</h3>
@@ -500,23 +520,31 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
</section>
- <section id=".[<string>],.[2],.[10:15]">
+ <section id="GenericObjectIndex:.[<string>]">
<h3>
-<code>.[&lt;string&gt;]</code>, <code>.[2]</code>, <code>.[10:15]</code>
+Generic Object Index: <code>.[&lt;string&gt;]</code>
</h3>
-<p>You can also look up fields of an object using syntax like <code>.[&quot;foo&quot;]</code> (.foo above is a shorthand version of this). This one works for arrays as well, if the key is an integer. Arrays are zero-based (like javascript), so <code>.[2]</code> returns the third element of the array.</p>
+<p>You can also look up fields of an object using syntax like <code>.[&quot;foo&quot;]</code> (.foo above is a shorthand version of this, but only for identifier-like strings).</p>
-<p>The <code>.[10:15]</code> syntax can be used to return a subarray of an array or substring of a string. The array returned by <code>.[10:15]</code> will be of length 5, containing the elements from index 10 (inclusive) to index 15 (exclusive). Either index may be negative (in which case it counts backwards from the end of the array), or omitted (in which case it refers to the start or end of the array).</p>
-<p>The <code>.[2]</code> syntax can be used to return the element at the given index. Negative indices are allowed, with -1 referring to the last element, -2 referring to the next to last element, and so on.</p>
+
+ </section>
+
+ <section id="ArrayIndex:.[2]">
+ <h3>
+
+Array Index: <code>.[2]</code>
-<p>The <code>.foo</code> syntax only works for simply keys i.e. keys that are all alphanumeric characters. <code>.[&lt;string&gt;]</code> works with keys that contain special characters such as colons and dots. For example <code>.[&quot;foo::bar&quot;]</code> and <code>.[&quot;foo.bar&quot;]</code> work while <code>.foo::bar</code> and <code>.foo.bar</code> would not.</p>
+
+ </h3>
+
+<p>When the index value is an integer, <code>.[&lt;value&gt;]</code> can index arrays. Arrays are zero-based, so <code>.[2]</code> returns the third element.</p>
-<p>The <code>?</code> “operator” can also be used with the slice operator, as in <code>.[10:15]?</code>, which outputs values where the inputs are slice-able.</p>
+<p>Negative indices are allowed, with -1 referring to the last element, -2 referring to the next to last element, and so on.</p>
@@ -557,49 +585,74 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
</table>
<table>
- <tr><th></th><td class="jqprogram">jq '.[2:4]'</td></tr>
- <tr><th>Input</th><td>[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]</td></tr>
+ <tr><th></th><td class="jqprogram">jq '.[-2]'</td></tr>
+ <tr><th>Input</th><td>[1,2,3]</td></tr>
<tr>
<th>Output</th>
- <td>[&quot;c&quot;, &quot;d&quot;]</td>
+ <td>2</td>
</tr>
</table>
+ </div>
+ </div>
+
+ </section>
+
+ <section id="Array/StringSlice:.[10:15]">
+ <h3>
+
+Array/String Slice: <code>.[10:15]</code>
+
+
+ </h3>
+
+<p>The <code>.[10:15]</code> syntax can be used to return a subarray of an array or substring of a string. The array returned by <code>.[10:15]</code> will be of length 5, containing the elements from index 10 (inclusive) to index 15 (exclusive). Either index may be negative (in which case it counts backwards from the end of the array), or omitted (in which case it refers to the start or end of the array).</p>
+
+
+
+ <div>
+
+ <a data-toggle="collapse" href="#example5">
+ <i class="glyphicon glyphicon-chevron-right"></i>
+ Examples
+ </a>
+ <div id="example5" class="manual-example collapse">
+
<table>
<tr><th></th><td class="jqprogram">jq '.[2:4]'</td></tr>
- <tr><th>Input</th><td>&quot;abcdefghi&quot;</td></tr>
+ <tr><th>Input</th><td>[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]</td></tr>
<tr>
<th>Output</th>
- <td>&quot;cd&quot;</td>
+ <td>[&quot;c&quot;, &quot;d&quot;]</td>
</tr>
</table>
<table>
- <tr><th></th><td class="jqprogram">jq '.[:3]'</td></tr>
- <tr><th>Input</th><td>[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]</td></tr>
+ <tr><th></th><td class="jqprogram">jq '.[2:4]'</td></tr>
+ <tr><th>Input</th><td>&quot;abcdefghi&quot;</td></tr>
<tr>
<th>Output</th>
- <td>[&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]</td>
+ <td>&quot;cd&quot;</td>
</tr>
</table>
<table>
- <tr><th></th><td class="jqprogram">jq '.[-2:]'</td></tr>
+ <tr><th></th><td class="jqprogram">jq '.[:3]'</td></tr>
<tr><th>Input</th><td>[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]</td></tr>
@@ -607,21 +660,21 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
<th>Output</th>
- <td>[&quot;d&quot;, &quot;e&quot;]</td>
+ <td>[&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]</td>
</tr>
</table>
<table>
- <tr><th></th><td class="jqprogram">jq '.[-2]'</td></tr>
- <tr><th>Input</th><td>[1,2,3]</td></tr>
+ <tr><th></th><td class="jqprogram">jq '.[-2:]'</td></tr>
+ <tr><th>Input</th><td>[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]</td></tr>
<tr>
<th>Output</th>
- <td>2</td>
+ <td>[&quot;d&quot;, &quot;e&quot;]</td>
</tr>
</table>
@@ -631,10 +684,10 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
</section>
- <section id=".[]">
+ <section id="Array/ObjectValueIterator:.[]">
<h3>
-<code>.[]</code>
+Array/Object Value Iterator: <code>.[]</code>
</h3>
@@ -647,11 +700,11 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
<div>
- <a data-toggle="collapse" href="#example5">
+ <a data-toggle="collapse" href="#example6">
<i class="glyphicon glyphicon-chevron-right"></i>
Examples
</a>
- <div id="example5" class="manual-example collapse">
+ <div id="example6" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq '.[]'</td></tr>
@@ -726,25 +779,26 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
</section>
- <section id=",">
+ <section id="Comma:,">
<h3>
-<code>,</code>
+Comma: <code>,</code>
</h3>
-<p>If two filters are separated by a comma, then the input will be fed into both and there will be multiple outputs: first, all of the outputs produced by the left expression, and then all of the outputs produced by the right. For instance, filter <code>.foo, .bar</code>, produces both the “foo” fields and “bar” fields as separate outputs.</p>
+<p>If two filters are separated by a comma, then the same input will be fed into both and the two filters’ output value streams will be concatenated in order: first, all of the outputs produced by the left expression, and then all of the outputs produced by the right. For instance, filter <code>.foo,
+.bar</code>, produces both the “foo” fields and “bar” fields as separate outputs.</p>
<div>
- <a data-toggle="collapse" href="#example6">
+ <a data-toggle="collapse" href="#example7">
<i class="glyphicon glyphicon-chevron-right"></i>
Examples
</a>
- <div id="example6" class="manual-example collapse">
+ <div id="example7" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq '.foo, .bar'</td></tr>
@@ -821,10 +875,10 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
</section>
- <section id="|">
+ <section id="Pipe:|">
<h3>
-<code>|</code>
+Pipe: <code>|</code>
</h3>
@@ -833,15 +887,19 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
<p>If the one on the left produces multiple results, the one on the right will be run for each of those results. So, the expression <code>.[] | .foo</code> retrieves the “foo” field of each element of the input array.</p>
+<p>Note that <code>.a.b.c</code> is the same as <code>.a | .b | .c</code>.</p>
+
+<p>Note too that <code>.</code> is the input value at the particular stage in a “pipeline”, specifically: where the <code>.</code> expression appears. Thus <code>.a | . | .b</code> is the same as <code>.a.b</code>, as the <code>.</code> in the middle refers to whatever value <code>.a</code> produced.</p>
+
<div>
- <a data-toggle="collapse" href="#example7">
+ <a data-toggle="collapse" href="#example8">
<i class="glyphicon glyphicon-chevron-right"></i>
Example
</a>
- <div id="example7" class="manual-example collapse">
+ <div id="example8" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq '.[] | .name'</td></tr>
@@ -869,6 +927,45 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
</section>
+ <section id="Parenthesis">
+ <h3>
+
+Parenthesis
+
+
+ </h3>
+
+<p>Parenthesis work as a grouping operator just as in any typical programming language.</p>
+
+
+
+ <div>
+
+ <a data-toggle="collapse" href="#example9">
+ <i class="glyphicon glyphicon-chevron-right"></i>
+ Example
+ </a>
+ <div id="example9" class="manual-example collapse">
+
+ <table>
+ <tr><th></th><td class="jqprogram">jq '(. + 2) * 5'</td></tr>
+ <tr><th>Input</th><td>1</td></tr>
+
+
+ <tr>
+
+ <th>Output</th>
+
+ <td>15</td>
+ </tr>
+
+ </table>
+
+ </div>
+ </div>
+
+ </section>
+
</section>
<section id="TypesandValues">
@@ -879,10 +976,10 @@ defined</code>. When using the Windows command shell (cmd.exe) it’s best to us
<p>Booleans, null, strings and numbers are written the same way as in javascript. Just like everything else in jq, these simple values take an input and produce an output - <code>42</code> is a valid jq expression that takes an input, ignores it, and returns 42 instead.</p>
- <section id="Arrayconstruction-[]">
+ <section id="Arrayconstruction:[]">
<h3>
-Array construction - <code>[]</code>
+Array construction: <code>[]</code>
</h3>
@@ -897,11 +994,11 @@ Array construction - <code>[]</code>
<div>
- <a data-toggle="collapse" href="#example8">
+ <a data-toggle="collapse" href="#example10">
<i class="glyphicon glyphicon-chevron-right"></i>
Example
</a>
- <div id="example8" class="manual-example collapse">
+ <div id="example10" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq '[.user, .projects[]]'</td></tr>
@@ -922,25 +1019,27 @@ Array construction - <code>[]</code>
</section>
- <section id="Objects-{}">
+ <section id="ObjectConstruction:{}">
<h3>
-Objects - <code>{}</code>
+Object Construction: <code>{}</code>
</h3>
<p>Like JSON, <code>{}</code> is for constructing objects (aka dictionaries or hashes), as in: <code>{&quot;a&quot;: 42, &quot;b&quot;: 17}</code>.</p>
-<p>If the keys are “sensible” (all alphabetic characters), then the quotes can be left off. The value can be any expression (although you may need to wrap it in parentheses if it’s a complicated one), which gets applied to the {} expression’s input (remember, all filters have an input and an output).</p>
+<p>If the keys are “identifier-like”, then the quotes can be left off, as in <code>{a:42, b:17}</code>. Keys generated by expressions need to be parenthesized, e.g., <code>{(&quot;a&quot;+&quot;b&quot;):59}</code>.</p>
+
+<p>The value can be any expression (although you may need to wrap it in parentheses if it’s a complicated one), which gets applied to the {} expression’s input (remember, all filters have an input and an output).</p>
<pre><code>{foo: .bar}</code></pre>
-<p>will produce the JSON object <code>{&quot;foo&quot;: 42}</code> if given the JSON object <code>{&quot;bar&quot;:42, &quot;baz&quot;:43}</code>. You can use this to select particular fields of an object: if the input is an object with “user”, “title”, “id”, and “content” fields and you just want “user” and “title”, you can write</p>
+<p>will produce the JSON object <code>{&quot;foo&quot;: 42}</code> if given the JSON object <code>{&quot;bar&quot;:42, &quot;baz&quot;:43}</code> as its input. You can use this to select particular fields of an object: if the input is an object with “user”, “title”, “id”, and “content” fields and you just want “user” and “title”, you can write</p>
<pre><code>{user: .user, title: .title}</code></pre>
-<p>Because that’s so common, there’s a shortcut syntax: <code>{user, title}</code>.</p>
+<p>Because that is so common, there’s a shortcut syntax for it: <code>{user, title}</code>.</p>
<p>If one of the expressions produces multiple results, multiple dictionaries will be produced. If the input’s</p>
@@ -967,11 +1066,11 @@ Objects - <code>{}</code>
<div>
- <a data-toggle="collapse" href="#example9">
+ <a data-toggle="collapse" href="#example11">
<i class="glyphicon glyphicon-chevron-right"></i>
Examples
</a>
- <div id="example9" class="manual-example collapse">
+ <div id="example11" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq '{user, title: .titles[]}'</td></tr>
@@ -1013,6 +1112,47 @@ Objects - <code>{}</code>
</section>
+ <section id="RecursiveDescent:..">
+ <h3>
+
+Recursive Descent: <code>..</code>
+
+
+ </h3>
+
+<p>Recursively descends <code>.</code>, producing every value. This is the same as the zero-argument <code>recurse</code> builtin (see below). This is intended to resemble the XPath <code>//</code> operator. Note that <code>..a</code> does not work; use <code>..|.a</code> instead. In the example below we use <code>..|.a?</code> to find all the values of object keys “a” in any object found “below” <code>.</code>.</p>
+
+<p>This is particularly useful in conjunction with <code>path(EXP)</code> (also see below) and the <code>?</code> operator.</p>
+
+
+
+ <div>
+
+ <a data-toggle="collapse" href="#example12">
+ <i class="glyphicon glyphicon-chevron-right"></i>
+ Example
+ </a>
+ <div id="example12" class="manual-example collapse">
+
+ <table>
+ <tr><th></th><td class="jqprogram">jq '..|.a?'</td></tr>
+ <tr><th>Input</th><td>[[{&quot;a&quot;:1}]]</td></tr>
+
+
+ <tr>
+
+ <th>Output</th>
+
+ <td>1</td>
+ </tr>
+
+ </table>
+
+ </div>
+ </div>
+
+ </section>
+
</section>
<section id="Builtinoperatorsandfunctions">
@@ -1021,10 +1161,10 @@ Objects - <code>{}</code>
<p>Some jq operator (for instance, <code>+</code>) do different things depending on the type of their arguments (arrays, numbers, etc.). However, jq never does implicit type conversions. If you try to add a string to an object you’ll get an error message and no result.</p>
- <section id="Addition-+">
+ <section id="Addition:+">
<h3>
-Addition - <code>+</code>
+Addition: <code>+</code>
</h3>
@@ -1055,11 +1195,11 @@ Addition - <code>+</code>
<div>
- <a data-toggle="collapse" href="#example10">
+ <a data-toggle="collapse" href="#example13">
<i class="glyphicon glyphicon-chevron-right"></i>
Examples
</a>
- <div id="example10" class="manual-example collapse">
+ <div id="example13" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq '.a + 1'</td></tr>
@@ -1136,10 +1276,10 @@ Addition - <code>+</code>
</section>
- <section id="Subtraction--">
+ <section id="Subtraction:-">
<h3>
-Subtraction - <code>-</code>
+Subtraction: <code>-</code>
</h3>
@@ -1150,11 +1290,11 @@ Subtraction - <code>-</code>
<div>
- <a data-toggle="collapse" href="#example11">
+ <a data-toggle="collapse" href="#example14">
<i class="glyphicon glyphicon-chevron-right"></i>
Examples
</a>
- <div id="example11" class="manual-example collapse">
+ <div id="example14" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq '4 - .a'</td></tr>
@@ -1189,10 +1329,10 @@ Subtraction - <code>-</code>
</section>
- <section id="Multiplication,division,modulo-*,/,and%">
+ <section id="Multiplication,division,modulo:*,/,and%">
<h3>
-Multiplication, division, modulo - <code>*</code>, <code>/</code>, and <code>%</code>
+Multiplication, division, modulo: <code>*</code>, <code>/</code>, and <code>%</code>
</h3>
@@ -1209,11 +1349,11 @@ Multiplication, division, modulo - <code>*</code>, <code>/</code>, and <code>%</
<div>
- <a data-toggle="collapse" href="#example12">
+ <a data-toggle="collapse" href="#example15">
<i class="glyphicon glyphicon-chevron-right"></i>
Examples
</a>
- <div id="example12" class="manual-example collapse">
+ <div id="example15" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq '10 / . * 3'</td></tr>
@@ -1315,11 +1455,11 @@ Multiplication, division, modulo - <code>*</code>, <code>/</code>, and <code>%</
<div>
- <a data-toggle="collapse" href="#example13">
+ <a data-toggle="collapse" href="#example16">
<i class="glyphicon glyphicon-chevron-right"></i>
Example
</a>
- <div id="example13" class="manual-example collapse">
+ <div id="example16" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq '.[] | length'</td></tr>
@@ -1375,11 +1515,11 @@ Multiplication, division, modulo - <code>*</code>, <code>/</code>, and <code>%</
<div>
- <a data-toggle="collapse" href="#example14">
+ <a data-toggle="collapse" href="#example17">
<i class="glyphicon glyphicon-chevron-right"></i>
Example
</a>
- <div id="example14" class="manual-example collapse">
+ <div id="example17" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq 'utf8bytelength'</td></tr>
@@ -1420,11 +1560,11 @@ Multiplication, division, modulo - <code>*</code>, <code>/</code>, and <code>%</
<div>
- <a data-toggle="collapse" href="#example15">
+ <a data-toggle="collapse" href="#example18">
<i class="glyphicon glyphicon-chevron-right"></i>
Examples
</a>
- <div id="example15" class="manual-example collapse">
+ <div id="example18" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq 'keys'</td></tr>
@@ -1475,11 +1615,11 @@ Multiplication, division, modulo - <code>*</code>, <code>/</code>, and <code>%</
<div>
- <a data-toggle="collapse" href="#example16">
+ <a data-toggle="collapse" href="#example19">
<i class="glyphicon glyphicon-chevron-right"></i>
Examples
</a>
- <div id="example16" class="manual-example collapse">
+ <div id="example19" class="manual-example collapse">
<table>
<tr><th></th><td class="jqprogram">jq 'map(has(&quot;foo&quot;))'</td></tr>
@@ -1522,17 +1662,17 @@ Multiplication, division, modulo - <code>*</code>, <code>/</code>, and <code>%</
</h3>
-<p>The builtin function <code>in</code> returns the input key is in the given object, or the input index corresponds to an element in the given array. It is, essentially, an inversed version of <code>has</code>.</p>
+<p>The builtin function <code>in</code> returns whether or not the input key is in the given object, or the input index corresponds to an element in the given array. It is, essentially, an inversed version of <code>has</code>.</p>
<div>
- <a data-t