I have a list of math topics as documents in firebaseFirestore. The objects of these topics (documents) have a field called, rootTopic that can be used to categorize them into groups.
I would like to query the collection of these topics (documents) and display them in groups using a recyclerView-in-recyclerView as seen below
THE CHALLENGE IS:
I am not quite sure how best to dynamically query and group these topics(documents). Please assist with hints or snippets on how to achieve this.