$ cat sample.json | jq '.items[]' | jq 'select(.owner.type == "Organization")'
or
$ cat sample.json | jq '[.items[]]' | jq 'map(select(.owner.type == "Organization" or .owner.type == "User"))'
or
$ cat _sample.json | jq '.items[] | select(.owner.type | startswith("Org"))'
or
$ cat _sample.json | jq '.items[] | select(.owner.type | test("^[a-zA-Z]+tion$"))'
# smple.json
{
"total_count": 3,
"items": [
{
"id": 111,
"name": "aaa",
"owner": {
"id": 1111111,
"type": "Organization"
},
"size": 10
},
{
"id": 222,
"name": "bbb",
"owner": {
"id": 2222222,
"type": "User"
},
"size": 30
},
{
"id": 333,
"name": "ccc",
"owner": {
"id": 3333333,
"type": "Organization"
},
"size": 25
}
]
}