Выходные данные JQ Count
echo '[{"username":"user1"},{"username":"user2"}]' | jq '. | length'
> 2
Tender Turkey
echo '[{"username":"user1"},{"username":"user2"}]' | jq '. | length'
> 2
var testvar={};
testvar[1]=2;
testvar[2]=3;
alert(testvar.length);
# /tmp/test.json contains [1, 2, 3]
jq length /tmp/test.json
# => 3