title: How to check for array contents in Google Firestore rules?
body: <p>I have a document <code>boxes/box-xyz</code> which contains an array <code>owners</code>. This array contains <code>uid</code>s of users who own the document and all documents in sub-collections. Example: <code>{owners: [&quot;uid123&quot;, &quot;uid456&quot;]}</code>.</p>
  <p>Now I want to write a rule which checks if the current user's <code>uid</code> is in this array. I tried with the array function <code>includes</code>, but it is not usable in the rules file.</p>
  <p>So how do I check if the current user is one of the owners of a document?</p>