title: Read Dynamic Json
body: <p>I have a requirement to read the json in which keys are vary and store into dictionary in C#.net. I am using Newtonsoft json. I am deserializing like below.  </p>
  
  <pre><code>var inputData = JsonConvert.DeserializeObject&lt;dynamic&gt;(myObj)
  </code></pre>
  
  <p>If the keys are fixed I can do like below.</p>
  
  <pre><code>var val = inputData.Account;
  </code></pre>
  
  <p>But here keys are dynamic. Below is my json data.</p>
  
  <pre><code> {
       "data": {
                  "Account": "150.80",
                  "Name": "XYZ",
                  "Description": "Some Value"
               }
   }
  </code></pre>
  
  <p>Here name value pairs may change. i.e., It may have like below also.</p>
  
  <pre><code> {
           "data": {
                      "Cost": "154.80",
                      "Type": "S1234",
                      "Period": "Some Value"
                   }
   }
  </code></pre>
  
  <p>How to access dynamic keys and store into a dictionary.</p>