Trying to use a variable as property when updating a document via Cloud functions. Maybe I miss the syntax here or is it simply not possible.
var value = 'myValue'
var name = 'myVariable'
admin.firestore().collection('mycollection').doc('mydocument').update({ name : value});
The document is updated but it shows then name = myValue and would like to see in the document myVariable = myValue. What would be the syntax to achieve that to be flexible?