Taha Sami
Taha Sami

Reputation: 1697

Is there way to get array length using firestore

I have array inside document in firestore , This array has approximate 284 item , Is there way to get array length ?

I don't have any code about that but you can leave simple example or method name , Thanks.

Upvotes: 2

Views: 2983

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317392

There is no simple function to get the length of an array in a document. What you will have to do is get() the document, then get() the array field from the DocumentSnapshot, and get the size of the List object from that field.

Upvotes: 5

Related Questions