(no title)
TymekDev | 2 years ago
jj 'data.#(age<=25)#' -i input.json
I don't think there is a way to sort an array, though. However, there is an option to have keys sorted. Personally, I don't think there is much annoyance in that. One could just pipe jj output to `sort | uniq -c`.I just discovered that gjson supports custom modifiers [1]. So technically, you could fork jj, and add another file registering `@sort` modifier via `gjson.AddModifier` and have a custom jj version supporting sorting.
[0]: https://github.com/tidwall/gjson/blob/master/SYNTAX.md
[1]: https://github.com/tidwall/gjson/blob/master/SYNTAX.md#modif...
No comments yet.