I have a JSON file I need to catch a particular key-value to do that here my JSON code
{
"uri": "https://wmg.nfa.futures.org/news/EnforceRegActions5imple.aspx",
"children": [
{
"uri": "https://www.nfa.futures.ortnews/EnforceRegActions5imple.aspx#145View%209%28e1233a13%401",
"children": [
{
"uri": "httpsghomm nfa futures org/news/EnforceReeActions5imple aspx#114Rule4%28e6ea03f2%400%40145View%209%28e1233a13%401",
"title": "Compliance Rules : Rule 2-2 : Rule",
"type": "Enforcement and Registration Actions : Rule",
"publishedDate": "2019-08-15",
"cachedDateTimeOffset": "0001-01-01700:00:00+00:00",
},
{
"uri": "httos./Pv'm nfa futures ore/news/EnforceReioctions5imple
aspx#114Rule4%28e6ea03f2%401%40145view%209%28e1233a13%401",
"title": "Compliance Rules : Rule 2-4 : Rule",
"type": "Enforcement and Registration Actions : Rule",
"publishedDate": "2019-08-15",
"cachedDateTimeOffset": "0001-01-01T00:00:00+00:00",
}
]
"children": [
{
"uri": "https://www.nfa.futures.ortnews/EnforceRegActions5imple.aspx#145View%209%28e1233a13%401",
"children": [
{
"uri": "httpsghomm nfa futures org/news/EnforceReeActions5imple aspx#114Rule4%28e6ea03f2%400%40145View%209%28e1233a13%401",
"title": "Compliance Rules : Rule 2-2 : Rule",
"type": "Enforcement and Registration Actions : Rule",
"publishedDate": "2019-08-15",
"cachedDateTimeOffset": "0001-01-01700:00:00+00:00",
"html": "<span data-rule-id=\"RULE 2-2\" data-rule-section=\"4\" data-rule-sub-section=\"0\" class.\"btn-add-rule\" data-cube-level=\"2\" data-cube-scope=\"7404961\">Rule</span>"
},
{
"uri": "httos./Pv'm nfa futures ore/news/EnforceReioctions5imple aspx#114Rule4%28e6ea03f2%401%40145view%209%28e1233a13%401",
"title": "Compliance Rules : Rule 2-4 : Rule",
"type": "Enforcement and Registration Actions : Rule",
"publishedDate": "2019-08-15",
"cachedDateTimeOffset": "0001-01-01T00:00:00+00:00",
"html": "<span data-rule-id=\"RuLE 2-4\" data-rule-section=\"4\" data-rule-sub-section=\"0\" class=\"btn-add-rule\" data-cube-level=\"2\" data-cube-scope=\"64787825\">Rule</span>"
}
]
}
]
}
As you can see in the Image I need that Html part to catch Using C# Code I was able to get this code as JSON for an object but I cannot select this Html value to a variable
using (StreamReader r = new StreamReader("US--NFA--INS--ENFORCE.structure.json"))
{
string json = r.ReadToEnd();
var parsed = JObject.Parse(json);
when I debug I can see all the values but I can not select a particular one I also tried SElECTED Token but with no luck.
my problem is this has two children json one has an HTML key other does not have i need to get the first children I need second children that HTML value that what I need but when I nested looping it always selected the first node how to solve this