title: query firebase for documents that contain an array of length > 0
body: <p>Is it possible to query firebase for documents in a collection where the number of elements in an array of a particular field is greater than 0 </p>
  
  <p>For my example, each document has-a field called 'people', which contains an array of integers (or the array is empty).</p>
  
  <p>My search always return 0 documents, but I have documents that I can see when I search in the firestore database admin panel.</p>
  
  <pre><code>import * as admin from 'firebase-admin';
  import * as functions from 'firebase-functions';
  admin.initializeApp();
  
  var db = admin.firestore();
  export const helloWorld = functions.https.onRequest(function(req,res)
  {
      var all_users = db.collection('users');
      var query = all_users.where("people.length", "&gt;", 0).get().then(snapshot =&gt; 
      {
          let docs = snapshot.docs;
  
          //return 1st document found
  
          res.send(docs[0].data());
      });
  
      query.catch(error =&gt;
      {
          res.status(500).send(error);
      });
  
  });
  </code></pre>