title: MongoDB Shell: Query BinData by Type
body: <p>I am trying to query a large collection by the _id field which uses BinData. </p>
  
  <p>Some of these ids use BinData of type 4:</p>
  
  <pre><code>"_id" : BinData(4,"CNDF66qIlCY92q1vFAAAAQ==")
  </code></pre>
  
  <p>While some use BinData of type 3:</p>
  
  <pre><code>"_id" : BinData(3,"CNDF66qJ29g92q1vFAAAEw==")
  </code></pre>
  
  <p>I need to find all of the _id fields that have BinData.type = 3 and was wondering if anyone has had luck querying like this in the MongoDB shell. </p>
  
  <p>Any help would be greatly appreciated!</p>