Right, the idea was that TeamsId is the _id value for that record.
You will need to run multiple queries to get the result that you want. That takes patience and persistence to learn how to do. The main thing that you need to be mindful about is that each query takes time to retrieve the data. In the meantime, any lines of code after that in the function will execute and before you want them to, if you’re not careful. Have a look at this article to get an idea of what’s involved:
https://www.wix.com/corvid/forum/corvid-tips-and-updates/promises-promises