#jq コマンドでリストを逆順に反転させる ( reverse )


とても簡単。

$ echo "[1,2,3]" | jq 'reverse'
[
  3,
  2,
  1
]
$ echo "[[1,2],[3,4],[5,6]]" | jq '.[] | reverse'
[
  2,
  1
]
[
  4,
  3
]
[
  6,
  5
]

Original by Github issue