一個節點我有這種格式的JSON數據:發現通過LINQ的使用Json.Net插入一個子節點或刪除其
{
"Name": "MainMenu",
"Text": "",
"Guid": "047bf56e75f44c14b56a4b84f3af6dbe",
"ParentGuid": "00000000000000000000000000000000"
"MenuEntries": [{
"Name": "Home",
"Text": "Home",
"Guid": "1e3df5fb3d8e463b8f37e8ccdb291802",
"ParentGuid": "047bf56e75f44c14b56a4b84f3af6dbe",
"MenuEntries": [{
"Name": "About",
"Text": "About",
"Guid": "f476a3444e2943668d86433f4c88374c",
"ParentGuid": "1e3df5fb3d8e463b8f37e8ccdb291802",
"MenuEntries": []
}, {
"Name": "Contact",
"Text": "Contact Us",
"Guid": "51b461ec6abd4aecb95cf662e8e15ae6",
"ParentGuid": "1e3df5fb3d8e463b8f37e8ccdb291802",
"MenuEntries": []
}
]
}, {
"Name": "About",
"Text": "About",
"Guid": "6954d6f747ef4d2dae33de0f0efae9cc",
"ParentGuid": "047bf56e75f44c14b56a4b84f3af6dbe",
"MenuEntries": []
}, {
"Name": "Contact",
"Text": "Contact Us",
"Guid": "634cfb99b70b4395b94061ae4f082aba",
"ParentGuid": "047bf56e75f44c14b56a4b84f3af6dbe",
"MenuEntries": []
}
]
}
如何找到通過LINQ的使用「的Guid一個特定節點'用於過濾的字段?
如何在所選節點中添加子節點('MenuEntries')並刪除此節點?
遠?你使用Json.Net –
我解析了字符串JObject,並試圖使用'Where'擴展名,但無法弄清楚如何使用它。 – eSPiYa