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