Is there way to get array length using firestore

Viewed 2469

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.

1 Answers

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.

Related