I have the following code
admin.firestore().collection("projects")
.doc(projectId)
.update({[`members.${email}`]: "member"});
the value of the variable email
is = "email@gmail.com"
and the result is
{
members: {
email@gmail: {
com: "member"
}
}
}
expected result is
{
members: {
email@gmail.com: "member"
}
}
I can use FiealPath in android(Kotlin) but how to use it in cloud functions (JavaScript)