{"action":"closed","issue":{"url":"https://api.github.com/repos/stedolan/jq/issues/783","labels_url":"https://api.github.com/repos/stedolan/jq/issues/783/labels{/name}","comments_url":"https://api.github.com/repos/stedolan/jq/issues/783/comments","events_url":"https://api.github.com/repos/stedolan/jq/issues/783/events","html_url":"https://github.com/stedolan/jq/issues/783","id":75351436,"number":783,"title":"unique function -args broken/doesn't work as documented","user":{"login":"virtzilla","id":7001119,"avatar_url":"https://avatars.githubusercontent.com/u/7001119?v=3","gravatar_id":"","url":"https://api.github.com/users/virtzilla","html_url":"https://github.com/virtzilla","followers_url":"https://api.github.com/users/virtzilla/followers","following_url":"https://api.github.com/users/virtzilla/following{/other_user}","gists_url":"https://api.github.com/users/virtzilla/gists{/gist_id}","starred_url":"https://api.github.com/users/virtzilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtzilla/subscriptions","organizations_url":"https://api.github.com/users/virtzilla/orgs","repos_url":"https://api.github.com/users/virtzilla/repos","events_url":"https://api.github.com/users/virtzilla/events{/privacy}","received_events_url":"https://api.github.com/users/virtzilla/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stedolan/jq/labels/docs","name":"docs","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-11T20:42:51Z","updated_at":"2015-07-25T18:42:39Z","closed_at":"2015-07-25T18:42:39Z","body":"If I try the examples documented for the unique function I get an error whenever trying to provide an argument. See below. \r\n\r\n*echo \"[{\"foo\": 1, \"bar\": 2}, {\"foo\": 1, \"bar\": 3}, {\"foo\": 4, \"bar\": 5}]\" | jq 'unique(.foo)'* \r\n*error: too many arguments to unique (expected 0 but got 1)* \r\n*unique(.foo)1 compile error*\r\n\r\nBTW - Same thing if I try it on https://jqplay.org. If I leave off the parentheses/argument, it will filter uniqueness on the entire record, but it doesn't appear to work with any args as documented.\r\n\r\nIf I try the other example (copy paste from the doc) with the length function on jqplay.org, I also get an error:\r\n\r\n*jq 'unique(length)'*\r\n*error: syntax error, unexpected INVALID_CHARACTER, expecting $end*\r\n*jq 'unique(length)'   1 compile error*\r\n\r\n"}}