I got a couple different formats that come in but I can\'t figure out how to handle them all because when I try to find by key json.net crashes. I was hoping it would just r
Assuming that you use Newtonsoft.Json:
You can use JObject to test if there is a property or not:
JObject jObj; //initialized somewhere, perhaps in your foreach
var msgProperty = jObj.Property("msg");
//check if property exists
if (msgProperty != null) {
var mag = msgProperty.Value;
} else {
//there is no "msg" property, compensate somehow.
}