|
|
|
|
|
by philsnow
822 days ago
|
|
only if you're sure that .count is never null: $ echo '[{"a": {"count": null}}]' | jq -c 'sort_by(-.count)'
jq: error (at <stdin>:1): null (null) cannot be negated
$ echo '[{"a": {"count": null}}]' | jq -c 'sort_by(.count) | reverse'
[{"a":{"count":null}}]
|
|