简体   繁体   中英

Firestore update map keys

Is it possible to update Firestore map's keys? I'm trying to do so through the Firestore dashboard and the key field is disabled as can be seen in the screenshot below? Does that mean that instead of updating the key, one needs to first delete the old entry and then create a new one?

在此处输入图像描述

There is no way to change the name of a field in Firestore. The API doesn't have such an operation, and (for that reason) it also isn't in the Firebase console.

You'll have to add a new field with the same value, and delete the old field.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM