'How to fetch @value from following json

I have following json.I want to fetch "rdfs:label"'s value when "@type" is "T:Class".

I want output like Stand1 Stand2

How to achieved this.

I have tried like this.

string json = File.ReadAllText("Filepath"); JObject Search = JObject.Parse(json);

IList results = Search["@standard"][0].Children().ToList(); foreach (JToken result in results) { } It gives me entire inner @standard block.

{
  "@School": {
    "name": "Vikas Mandir",
    "subject": "Maths",
    "author": "Joshi",
  
  },
  "@standard": [
    {
      "@id": "vikas:Stand1",

      "@standard": [
        
        {
          "@id": "vikas:Stand12",
          "@type": "T:Class",
          "tag:Std:label": {
            "@value": "Stand1"
          },
          "rdfs:label": {
            "@value": "Stand1"
          }
        },

        {
          "@id": "vikas:Stand123",
          "@type": "T:Class",
          "tag:Std:label": {
            "@value": "Stand2"
          },
          "rdfs:label": {
            "@value": "Stand2"
          }
        }
]
}
]
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source