JavaScript query firebase for documents that contain an array of length > 0 firebase query documents

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

For my example, each document has-a field called 'people', which contains an array of integers (or the array is empty).

My search always return 0 documents, but I have documents that I can see when I search in the firestore database admin panel.

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", ">", 0).get().then(snapshot => 
    {
        let docs = snapshot.docs;

        //return 1st document found

        res.send(docs[0].data());
    });

    query.catch(error =>
    {
        res.status(500).send(error);
    });

});
Answer:1

Introduction Hello, I'm trying to build a counter component for my online store, but I'm having trouble getting with it to function correctly. Problem From my understanding is that the count value ...

Introduction Hello, I'm trying to build a counter component for my online store, but I'm having trouble getting with it to function correctly. Problem From my understanding is that the count value ...

  1. react increment state property

For example: function Constructor() { this.peoperty = 1; this.myMethod1 = function() { //do something }; this.myMethod2 = function() { let a = myMethod3(); } /*no '...

For example: function Constructor() { this.peoperty = 1; this.myMethod1 = function() { //do something }; this.myMethod2 = function() { let a = myMethod3(); } /*no '...

  1. does vinegar kill viruses
  2. does hand sanitizer expire
  3. does he like me
  4. does target price match
  5. does the dog die
  6. does walmart price match
  7. does amazon price match
  8. does amazon pay taxes
  9. does water have memory
  10. does urine hold dna
  11. does wine go bad
  12. does medicare cover dental
  13. does noom work
  14. does zicam work
  15. does ups deliver on saturday
  16. does tamiflu work
  17. does usps deliver on sunday
  18. does polyester shrink
  19. does ups deliver on sunday
  20. does rogaine work

I'm trying to use ajax add to the cart in related products but I don't know how to get link to the each related products? I would like to use ajax and not be redirected to the cart page when I click ...

I'm trying to use ajax add to the cart in related products but I don't know how to get link to the each related products? I would like to use ajax and not be redirected to the cart page when I click ...

I am beginner in typescript programming not able to set property interface type so please guide me about that. interface addition { num1: number; num2: number; add(num1:number, num2:...

I am beginner in typescript programming not able to set property interface type so please guide me about that. interface addition { num1: number; num2: number; add(num1:number, num2:...