jq get array size code example Example: jq count outputs echo '[{"username":"user1"},{"username":"user2"}]' | jq '. | length' > 2