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:
@@ -941,9 +941,12 @@ sections:
|
|||||||
`group_by`.
|
`group_by`.
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
- program: 'unique'
|
- program: 'unique_by(.foo)'
|
||||||
input: '[1,2,5,3,5,3,1,3]'
|
input: '[{"foo": 1, "bar": 2}, {"foo": 1, "bar": 3}, {"foo": 4, "bar": 5}]'
|
||||||
output: ['[1,2,3,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`
|
- title: `reverse`
|
||||||
|
Reference in New Issue
Block a user