Skip to content

Added sample feature in jsonrange

Pre-release
Pre-release
Compare
Choose a tag to compare
@rsdoiel rsdoiel released this 27 Aug 17:50
· 133 commits to main since this release

This pre-release adds an experimental feature to jsonrange that allows you to take a "sample" of a list of objects you are iterating through with JSON range. The sample option works like limit but does a shuffle of the full array before applying limit. e.g. if I have an array of [1,3,4,5,6,7,8,9,10,11] and use the command echo '[1,2,3,4,5,6,7,8,9,10,11]' | jsonrange -sample=3 I will get a random sample of three elements from the array.