I want to use a variable as a key in dictionary using Firestore.
var uid = "123456";
await admin
.firestore()
.collection("shop")
.doc(shopId)
.update({
"role.${uid}": "reader",
});
But this above code doesn't work.
The result is here. enter image description here
How do I set the uid
to role
's key?