Need to obtain shopping cart sum after series of getDocument price lookups
问题 I'm trying to get the total of a shopping cart in Firestore by executing a series of for loop calls that calculate the sum of items in the shopping cart. The shopping cart is stored in a table called carts and the view upon appearing is pulled into an in-application dictionary called cartCache, of the type [String: Int]? where the key is the UID for the item and the value is the quantity of the item. However, the price of the item is stored in another collection called items . I only want to