title: AWS CLI How to Query Multiple Arguments from the same element?
body: <p>I'm trying to use AWS CLI to query S3 objects owned by a specific account AND only if the object has a specific size. Is there any way to do an AND query? These are some of the hundreds of alternatives I've already tried but none of them worked:</p>
  
  <pre><code>aws s3api list-objects-v2 --bucket bucket-name --fetch-owner  --output json --query "'Contents[?Size==`0`].[Key,Owner.ID,Size]' || [?Owner.ID=='00000000111111122222222aaabbbcccdddeeefff']"
  </code></pre>
  
  <pre><code>aws s3api list-objects-v2 --bucket bucket-name --fetch-owner --output json --query "Contents[?Owner.ID=='00000000111111122222222aaabbbcccdddeeefff']||[?Size==`0`].[Key,Size]"
  </code></pre>
  
  <p>Any help is welcome!</p>
  
  <p>Thanks in advance!</p>