【发布时间】:2014-07-22 22:15:25
【问题描述】:
我有一个JObject 等于:
"Info":
{
"View":"A",
"Product":"B",
"Offer":"Offer1",
"Demo":"body {background-color:red;} #box {border:dotted 50px red;}",
"Log":false
}
如何返回对象的名称“Info”?
我目前正在使用Path 属性,如下所示:
jObject.Name = jObject.Path.Substring(jObject.Path.jObject('.') + 1);
有没有更好的方法来做到这一点?
【问题讨论】:
-
Info不是数组,而是对象。