can i fetch all the collections inside a document in a list?

have a collection of “chats” where documents generate dynamically and inside that document, collections are being created dynamically too, I have got the document name but unable to fetch all collections inside, can you please help?