I have the following structure on firestore, and I want to retrieve series documents that have the same category or genre (10 docs at a time).
EX: 10 series documents of category Mystery
I know it's done using the where()
and limit()
methods, but I don't know how to access the objects in the categories array
especially when they have no names.
CodePudding user response:
Currently, you cannot search for nested items within nested lists, you can however search for the exact object in the list, and in your case it's a Map<String, String>
.
So, use this, which might\should work:
.where('categories', arrayContains: {"ar_title": غموض, "en_title":"Mystery"})