use*_*857 5 firebase firebase-realtime-database google-cloud-firestore
我正在尝试使用 REST API 更新 firestore 数据库中的字段,但我找不到在不覆盖字段初始数据的情况下执行此操作的方法。
这是我的数据库文档示例中的消息字段:
Messages : [
{ senderId: "id-1", text: "Hi Jack"}
{ senderId: "id-2", text: "Hello"}
]
Run Code Online (Sandbox Code Playgroud)
如何在不删除以前的数据的情况下将新对象(mapValue)添加/推送到{ senderId: "id-1", text: "How are you"}我的消息字段?
我尝试使用 updateMask.fieldPaths=Messages 修补 REST API,但它会覆盖以前的数据。
谢谢
| 归档时间: |
|
| 查看次数: |
740 次 |
| 最近记录: |