Hello,
I have a function that runs when a new user is added to the title. I want to save a json in a player read only data. Here's the simplified version of the code:
handlers.NewUser = function(args, context) { var initialData = { "PlayfabId": currentPlayerId, "Data": { "SpeedPoints": 0, "Money": { "Cash": 0, "Bank": 1000 } }, "Permission": "Private" }; server.UpdateUserReadOnlyData(initialData); };
When I check the user's account, I can see the "SpeedPoints" key-value pair, however there is no "Money" key-value pair.
I want to combine some data to reduce the number of keys that I need to get in Cloudscript.