我有一个 Object 类型的变量,它包含这样的数据
项目[0]=[ {id=a,name=b,url=c},{id=d,name=e,url=f},{id=a,name=b,url=c}... ]
项目[1]=[ {id=a,name=b,url=c},{id=d,name=e,url=f},{id=a,name=b,url=c}... ]
......
我怎么能循环这个?
更新
if (null != myProjects) //myProjectsis of type object
{
dirEntry = myProjects as Dictionary<string, object>;
dirDetails = dirEntry["Response"] as Dictionary<string, object>;
object projects = null;
foreach (var item in dirDetails)
{
if ("Items" == item.Key)
{
projects = dirDetails["Items"];
break;
}
}
现在projects
将包含对象数组。我不想循环它来获取一些值