I use this code to consume GitHub API and automate some tasks:
curl --silent -H 'Authorization: token github_access_token' 'https://api.github.com/orgs/OrganizationName/repos?per_page=100'
Sometimes I get this as the response:
[
]
I want to know if the response is an empty array or not.
I thought of using jq like echo $Response | jq -r ".[]" but I don't know how to continue from there.
How can I find out a JSON string is an empty array in bash?