I have this function that basically copies whatever the player has in their tags to the User Data but something strange is happening, when I call the function it works, but the Key always ends with [0], I just want the key to be "Sensitivity"
This is the function:
handlers.saveSensitivityFromTagsToUserData = function (args, context) {
var getPlayerTagsResponse = server.GetPlayerTags({ "PlayFabId": currentPlayerId })
var foundTags = JSON.parse(JSON.stringify(getPlayerTagsResponse.Tags).replace('title.528BC.', ''))
var updatePlayerDataResponse = server.UpdateUserData({"PlayFabId": currentPlayerId, "Data": {"Sensitivity": foundTags}, "Permission": "Public"})
return foundTags;
}