❔ 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:
{
   "v":1,
   "matches_filters":{
      "current":[
      ]
   },
   "meta":{
      "action":"updated",
      "id":1,
      "is_bulk_update":false,
      "matches_filters":{
         "current":[
            
         ]
      },
      "object":"organization",
      "permitted_user_ids":[
         125421,
         12312,
         123123
      ],
      "pipedrive_service_name":false,
      "timestamp":1231415,
   },
   "current":{
      "address_route":"Mama",
      "related_closed_deals_count":0
   },
   "event":"updated",
   "retry":0
} 
Was this page helpful?