Convert JObject to type at runtime
Use ToObject
:
var data = processedEvent.Data.ToObject(t);
or if you have a known type then:
MyObject data = processedEvent.Data.ToObject<MyObject>();
Use ToObject
:
var data = processedEvent.Data.ToObject(t);
or if you have a known type then:
MyObject data = processedEvent.Data.ToObject<MyObject>();