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

Added texts/examples to unique_by function

This commit is contained in:
Santiago Lapresta
2014-05-12 01:43:00 +02:00
parent 41a093c1f2
commit 69aa0003af

View File

@@ -941,9 +941,12 @@ sections:
`group_by`.
examples:
- program: 'unique'
input: '[1,2,5,3,5,3,1,3]'
output: ['[1,2,3,5]']
- program: 'unique_by(.foo)'
input: '[{"foo": 1, "bar": 2}, {"foo": 1, "bar": 3}, {"foo": 4, "bar": 5}]'
output: ['[{"foo": 1, "bar": 2}, {"foo": 4, "bar": 5}]']
- program: 'unique_by(length)'
input: '["chunky", "bacon", "kitten", "cicada", "asparagus"]'
output: ['["chunky", "bacon", "asparagus"]']
- title: `reverse`