C# traverse JObject

JObject pcount = new JObject();
int numTotal = 0;
IEnumerable<JProperty> properties = pcount.Properties();
foreach (JProperty item in properties)
{
    
    
	numTotal += int.Parse(item.Value.ToString());
	// item.Name 为 键
	// item.Value 为 值
}

Guess you like

Origin blog.csdn.net/KaiSarH/article/details/108620218