Leo*_*aus 5 javascript node.js firebase google-cloud-firestore
我正在尝试获取 Firebase Firestore 中查询文档的路径。这是我的代码:
const location = await db.doc('/locations/US/regions/IOWA').get()
console.log(location.path)
Run Code Online (Sandbox Code Playgroud)
但是location.path返回未定义。
location.id 工作并返回ID。
我已将此用作资源:https : //firebase.google.com/docs/reference/js/firebase.firestore.DocumentReference#path
| 归档时间: |
|
| 查看次数: |
3500 次 |
| 最近记录: |