1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

119 Commits

Author SHA1 Message Date
Nicolas Williams
dc7857c585 Update site news 2014-06-08 20:45:06 -05:00
Nicolas Williams
1dbe9317bc Add indices(s), improve index(s), rindex(s)
Now these deal with arrays as input and `s` being an array or a scalar.
2014-06-08 02:01:44 -05:00
Nicolas Williams
ef4f3a54fe Improve index and rindex examples 2014-06-08 02:01:21 -05:00
Nicolas Williams
9af03c2562 Remove reference to getpath from docs 2014-06-08 01:35:03 -05:00
Nicolas Williams
c10e5f4e73 Document index and rindex (#389) 2014-06-08 00:00:17 -05:00
Santiago Lapresta
01f676041d Added join function
Signed-off-by: Nicolas Williams <nico@cryptonector.com>
2014-06-07 21:53:03 -05:00
Nicolas Williams
35b6b949e3 Add -j option to scripts/crosscompile 2014-06-04 18:36:30 -05:00
Santiago Lapresta
072ebb911b Documented del command 2014-05-21 01:23:28 +02:00
Santiago Lapresta
69aa0003af Added texts/examples to unique_by function 2014-05-12 01:44:53 +02:00
Santiago Lapresta
41a093c1f2 Added unique_by function 2014-05-12 01:37:27 +02:00
Nico Williams
6f0a9521e1 Merge pull request #176 from pearkes/new-tutorial
Docs: Update the tutorial to use GitHub's API
2014-03-13 00:57:54 -05:00
Nicolas Williams
aee5c3ecb0 Fix for #303 in the sources 2014-03-13 00:57:33 -05:00
Nicolas Williams
769314a8a2 Document scalars 2014-03-13 00:29:53 -05:00
Nicolas Williams
1a1adf73e8 Document arrays, objects, ... 2014-03-13 00:29:53 -05:00
Filippo Valsorda
2aa8a43c5b Add a recursive object merge strategy and bind it to *
This commit adds a jv_object_merge_recursive function, that performs
recursive object merging, and binds it to multiply when applied to
two objects.

Added docs and tests.

Closes #320
2014-03-08 03:56:05 +01:00
Nicolas Williams
fe29d3d3fa Add ?, .[]?, and .. operators
Make XPath-like `//a/b` recursive structure traversal easier in jq,
which then becomes:

    ..|.a?.b?

The `?` operator suppresses errors about . not being an array or object.
The `..` operator is equivalent to calling the new `recurse_down`
built-in, which in turn is equivalent to

    recurse(.[]?)

Note that `..a` is not supported; neither is `...a`.  That could be add
added, but it doesn't seem worth the trouble of saving the need to type
a '|'.
2014-02-20 15:33:07 -06:00
LCD 47
fb9196021e manual.yml: fix indent for the new any and all commands. 2014-02-19 15:10:32 +02:00
Santiago Lapresta
8b41415b07 Added all and any builtins 2014-02-17 04:01:32 +01:00
Nicolas Williams
1fa55a3fae Fix cut-n-paste in leaf_paths; doc and test 'em 2014-02-05 23:14:05 -06:00
Nicolas Williams
e12d0ffd1e Document --version 2013-12-26 18:48:51 -06:00
Nicolas Williams
cb976b9a50 Document .foo.bar in manual 2013-12-26 18:25:31 -06:00
Nicolas Williams
060eb39bf9 Document exit numbers 2013-12-26 12:54:07 -06:00
Nicolas Williams
41a8ae7557 Fix doc typos (.[foo] wanted to be .["foo"]) 2013-12-25 17:09:27 -06:00
Nicolas Williams
1956abbedf Add note to jq.1 about shell quoting 2013-12-25 17:05:32 -06:00
Philipp Hagemeister
4d40a47eab Fix @uri example
Previously, the @uri example didn't match the actual behavior of the current jq, as exclamation marks do not need to be encoded in URIs.
Replace the example with an input that needs encoding, and is encoded by jq.
2013-12-20 11:32:53 +01:00
Nicolas Williams
dac081e183 Fix manual.yml 2013-12-06 11:58:55 -06:00
Nicolas Williams
09104ce531 Document ltrimstr and rtrimstr 2013-12-04 18:21:41 -06:00
Nicolas Williams
fa316ac430 Document -u / --unslurp option 2013-12-04 18:21:41 -06:00
Nicolas Williams
4e07eac356 Document -e / --exit-status argument 2013-12-04 18:21:40 -06:00
Nicolas Williams
8cee66e609 Document tojson and fromjson builtins 2013-12-04 18:21:40 -06:00
Nicolas Williams
20b32db5af Document split function 2013-12-04 18:21:40 -06:00
Nicolas Williams
b634722c8a Document string multiplication and division 2013-12-04 18:21:40 -06:00
Nicolas Williams
c9e8581f45 Document string functions and slicing 2013-12-04 18:21:39 -06:00
Stephen Dolan
6a401c8262 Add a --unbuffered option. Closes #206 2013-11-08 12:21:45 +00:00
Peter van Dijk
bdbfa7e32c count should be length
Example refers to a count function, which does not exist. Replacing it with length works.
2013-11-07 16:39:44 +01:00
Ryoichi KATO
da723d3e11 Docs: add description of --from-file option 2013-10-16 21:42:29 +09:00
Kenny Shen
2f6b89ef70 Add missing -i flag in build instructions 2013-09-20 10:34:57 +08:00
Stephen Dolan
4e3024cb61 Merge pull request #182 from mdaines/sqrt-builtin
Add builtin for calculating square root
2013-09-14 16:34:52 -07:00
Mike Daines
fe99532f8b Fix typo 2013-09-13 12:15:52 -04:00
Michael Daines
82d8253c19 Add sqrt operator 2013-09-11 20:24:41 -04:00
Jack Pearkes
c1717d6e12 docs: update the tutorial to use GitHub's API 2013-09-04 11:42:40 +02:00
Stephen Dolan
54b9c9bdb2 Fix example in manual for floor. See #155. 2013-06-22 12:17:28 +01:00
Nicolas Williams
3dcdc582ea Document floor 2013-06-21 15:27:34 -05:00
Nicolas Williams
1d839ff9df Document mod 2013-06-21 15:27:34 -05:00
Stephen Dolan
81e2336ace Support ."foo" syntax for accessing fields. See #141. 2013-06-11 22:26:39 +01:00
Stephen Dolan
cc8761dbde Add command-line option to sort object keys.
Closes #79.
2013-06-03 23:12:31 +01:00
Nicolas Williams
03598bb5d6 Add --argfile variant of --arg (issue #117)
This is useful when one has a database (in JSON form) to query using jq
input data.

    % echo '{"a":1, "c":5}' > db.json
    % echo '"c"'|./jq --argfile f /tmp/a '$f[.]'
    5
    % echo '"a"'|./jq --argfile f /tmp/a '$f[.]'
    1
    % echo '"b"'|./jq --argfile f /tmp/a '$f[.]'
    null
    %
2013-05-23 13:52:06 -05:00
Stephen Dolan
0535e724a2 jq 1.3 release 2013-05-19 11:48:18 +01:00
Stephen Dolan
bc42812715 Remove the insane "fold" operation, replace with saner "reduce". 2013-05-16 15:07:53 +01:00
Stephen Dolan
919292764a Reverse function. Closes #94. 2013-05-16 14:25:28 +01:00