假设您正在使用Newtonsoft.Json.Linq.JObject,则不需要使用动态。JObject类可以使用字符串索引器,就像字典一样:
JObject myResult = GetMyResult();returnObject.Id = myResult["string here"]["id"];
希望这可以帮助!

假设您正在使用Newtonsoft.Json.Linq.JObject,则不需要使用动态。JObject类可以使用字符串索引器,就像字典一样:
JObject myResult = GetMyResult();returnObject.Id = myResult["string here"]["id"];
希望这可以帮助!