title: MongoDB find Documents where all array elements equal some value
body: <p>Collection:</p>
  <pre><code>db.test.find()
  {
    { &quot;_id&quot; : ObjectId(...), &quot;arr&quot; : [ &quot;Today&quot;, &quot;is&quot;, null ] }
    { &quot;_id&quot; : ObjectId(...), &quot;arr&quot; : [ null, null, null ] }
  }
  </code></pre>
  <p>I'm trying to find all documents where all of <code>arr</code> equals some value. In this example, I would want the document containing <code>arr : [null, null, null]</code> when given <code>null</code>.</p>
  <p><a href="https://stackoverflow.com/questions/26392534/find-documents-where-all-elements-of-an-array-have-a-specific-value">Find documents where ALL elements of an array have a specific value</a></p>
  <p>This solution is close to what I want; however, my array data do not have keys for an <code>$elemMatch</code> to reference. Is there a way to accomplish this query without being unnecessarily costly or restructuring my data?</p>
  <p>Thanks!</p>