I get an error message when I want to get the json value of my TitleData key/value pair.
Error CS1061: 'string' does not contain a definition for 'Value' and no accessible extension method 'Value' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)
bool active = false; DateTime nextreset; var result = await PlayFabClientAPI.GetTitleDataAsync(new PlayFab.ClientModels.GetTitleDataRequest()); string key = "Leaderboard-1-1"; if (result.Result.Data.ContainsKey(key)) { if ((result.Result.Data[key].Value != null) && (result.Result.Data[key].Value != string.Empty)) { Dictionary<string, object> dic = PlayFabSimpleJson.DeserializeObject<Dictionary<string, object>>(result.Result.Data[key].Value.ToString()); if (dic.TryGetValue("Active", out object a)) { active = Convert.ToBoolean(a); } if (dic.TryGetValue("NextReset", out object b)) { nextreset = Convert.ToDateTime(b); } } }
What is wrong with my code? How can I get the values of "Active" and "NextReset"?