更新时间:2023-01-18 08:36:03
您可以这样找到它:
JObject jo = array.Children<JObject>()
.FirstOrDefault(o => o["text"] != null && o["text"].ToString() == "Two");
这将在JArray
中找到具有名为text
且值为Two
的属性的第一个JObject
.如果不存在这样的JObject
,则jo
将为空.
This will find the first JObject
in the JArray
having a property named text
with a value of Two
. If no such JObject
exists, then jo
will be null.