How to fetch data from two firestore collection, merge and display it

徘徊边缘 提交于 2021-02-17 05:20:12

问题


I have two collections namely CURRENCY_PAIR and CURRENCY_PAIR_LIMIT. The CURRENCY_PAIR collection has the following fields in each document:

  • CurrencyPair_Name
  • CurrencyPair_id
  • Currency_AskPrice
  • Currency_BidPrice

and theCURRENCY_PAIR_LIMIT collection contain the following fields in each document:

  • Limit_id
  • Limit_Buy_Price_Threshhold
  • Limit_Sell_Price_Threshhold
  • Limit_Currency_Pair_Id (references to the Currencypair_Id in the CURRENCY_PAIR collection)

I wanted to map each CurrencyPair_Name to its respective Limit_Buy_Price_Threshhold and Limit_Sell_Price_Threshhold then display them in react but i'm stuck. How can i get around this.

来源:https://stackoverflow.com/questions/64953805/how-to-fetch-data-from-two-firestore-collection-merge-and-display-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!