I'm getting unquoted json string with dynamic properties from API and I need to check if specific property exist, and if it does I need to get it's value. For example I'm getting this string:
"{overridedCondition:used,makerAndModelMissing:true}"
I need to check for 'overridedCondition', if it exist I need to get it's value. I tried something like this but I'm getting exception like 'Error parsing undefined value. Path 'overridedCondition'':
var json = "{overridedCondition:used,makerAndModelMissing:true}";
var result = JsonConvert.DeserializeObject<dynamic>(json);
I also tried parsing it with
JObject.Parse(json);
but that didn't worked either.
Does anyone have some suggestion on how to parse this string so I'm able to access it's values.
I'm using .net 6 for this project. Thanks