I am new to LINQ
queries and would like to know if what I am trying to achieve is possible via LINQ
query.
So, I have a JSON doc as below.
I am trying to get all the values that match the "$type" and return me the directory path and the value for $type.
I know an interactive way of doing this but it seems LINQ is preferred and supposed to be easy to get this.
{
"$type":"type1",
"title":"US version",
"_object1":[
{
"$type":"type2",
"rootModule":{
"id":"page",
"modules":[
{
"id":"header",
"$type":"module-header"
},
{
"id":"footer",
"$type":"module-footer"
}
]
}
},
{
"$type":"type2",
"_id":"ab134"
},
{
"$type":"type3",
"_id":"ab567"
}
],
"_object2":[
{
"$type":"module1",
"constraintsId":"page"
},
{
"name":"header1 1",
"nestedobject":{
"$type":"nestedobject-type",
"dataBinder":{
"id":"ab244"
}
}
}
]
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…