How to read JSON file and select specific values C# [Done]
<p>I'm a <strong>beginner</strong> in development so please don't judge.
I need to read many (like 74) JSON files and all of them have other values.
How can I read the JSON files dynamicly and can select specific values?</p>

<p>Currently I use Newtonsoft Json, but I don't know how I can get specific values.
So as a sample this is one of the JSON file.</p>

<pre><code>{
    "value": [
        {
            "resourceRef": "/accessControlLists/abc123",
            "resourceId": "abc123",
            "resourceMetadata": {
                "resourceName": "SCVMM Default ACL"
            },
            "etag": "W/\"ea02b098-bcd1-406a-abff-ab380011d510\"",
            "instanceId": "e123f536-ffc1-429e-b67e-50627b1613c8",
            "properties": {
                "provisioningState": "Succeeded",
                "aclRules": [
                    {
                        "resourceRef": "/accessControlLists/abc123/aclRules/def456",
                        "resourceId": "def456",
                        "etag": "W/\"ea02b098-bcd1-406a-abff-ab380011d510\"",
                        "instanceId": "e3467412-e9c7-48a0-9d45-bdaedbe72d2d",
                        "properties": {
                            "provisioningState": "Succeeded",
                            "protocol": "All",
                            "sourcePortRange": "*",
                            "destinationPortRange": "*",
                            "action": "Allow",
                            "sourceAddressPrefix": "*",
                            "destinationAddressPrefix": "*",
                            "priority": "65000",
                            "description": "SCVMM Default Rule - Allow All",
                            "type": "Inbound",
                            "logging": "Enabled"
                        }
                    }
                ],
                "ipConfigurations": [],
                "subnets": []
            }
        }
    ],
    "nextLink": ""
}
</code></pre>

<p>The second file is like this.</p>

<pre><code>    {
      "resourceRef": "/virtualNetworkManager/",
      "instanceId": "00000000-0000-0000-0000-000000000000",
      "properties": {
        "provisioningState": "Succeeded",
        "distributedRouterState": "Enabled",
        "networkVirtualizationProtocol": "VXLAN"
      }
    }
</code></pre>

<p>So how can I read as a sample the description of the first file?
And how can I do it dynamicly?</p>

<p>Thanks for help!</p>

<p>Edit:
<code>dynamic</code> with <code>JsonConvert</code> worked for me.</p>

<pre><code>        string path = string.Empty;
        Console.Write("Please enter json file path: ");
        path = Console.ReadLine();

        dynamic obj = JObject.Parse(File.ReadAllText(path));
        for (int i = 0; i &lt; obj.value.Count; i++)
        {
            for (int j = 0; j &lt; obj.value[i].properties.aclRules.Count; j++)
            {
                Console.WriteLine(obj.value[i].properties.aclRules[j].properties.description);
            }
        }
</code></pre>