❔ Get value out of deserialized json object.
I need to get value out of meta, from the "object".
As for now I also use this:
Dictionary<string, object> msg = (Dictionary<string, object>)result;
But since its generic Im not sure how to access the field value. Any help?
These dont work:
var result = data["meta"]["object"].Value<string>();
var result = data.SelectToken("meta.object").ToString();
var result = data.Descendants()
.OfType<JProperty>()
.FirstOrDefault(x => x.Name == "object")
?.Value;
And here is the json:
As for now I also use this:
Dictionary<string, object> msg = (Dictionary<string, object>)result;
But since its generic Im not sure how to access the field value. Any help?
These dont work:
var result = data["meta"]["object"].Value<string>();
var result = data.SelectToken("meta.object").ToString();
var result = data.Descendants()
.OfType<JProperty>()
.FirstOrDefault(x => x.Name == "object")
?.Value;
And here is the json: