Get Last Array Element

Get the last element of an array.

Code

General
echo "$arr" | jq '.[-1]'

Parameters

Array (JSON)

Server

More Bash Snippets