so I have a string containing a json
dynamic jsonQuery = JObject.Parse(query);
since this object I don't always get all the property's I need to be able to check if a ceratin property exits
if (IsProperty(jsonQuery,"MetaContent"))
{
// do stuff
}
I tried it with classic reflection but that does not seem to work:
private bool IsProperty(object obj, string propertyName)
{
return obj.GetType().GetProperty(propertyName) != null;
}
The function always returns false
any idea?