【发布时间】:2021-04-24 11:00:50
【问题描述】:
我想访问 UserPrefs 并直接访问 weather_location 而不指定文档名称。我该怎么做?
const res = await firestore().collection('Users').doc(uid).collection('userPrefs').doc().set({weather_location: location});
【问题讨论】:
-
该集合中有三个文档。如果您不知道 ID,那么您如何知道要更新哪些 ID?
标签: javascript firebase react-native google-cloud-firestore