diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-12-03 02:02:12 +0000 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-12-03 02:02:12 +0000 |
commit | fadeb66365cb8da2cddf3993ad139736922852ae (patch) | |
tree | f11334ac35662fbbe08b987a09e07262c6536805 /builtin.c | |
parent | c8bbfed0410b7181a81952fb9314d5995b0d5e2e (diff) |
Add a `unique` function.
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -295,6 +295,7 @@ static const char* jq_builtins[] = { "def select(f): if f then . else empty end;", "def sort_by(f): _sort_by_impl(map([f]));", "def group_by(f): _group_by_impl(map([f]));", + "def unique: group_by(.) | map(.[0]);", }; |