title: How to access the values in a dynamic dictionary in C#?
body: <p>I have a dictionary which is dynamically generated. In the dictionary, for a single Key, there are multiple values. I am trying to access one of the values in those multiple values. My code so far:</p>
  
  <pre><code>        var result = new Dictionary&lt;string, object&gt;();
          var dictionary = deserialisedResult as IDictionary&lt;string, object&gt;;
          foreach (var item in dictionary)
          {
              result.Add(item.Key, item.Value);
          }
          object o = result;
          string[] names = o.GetType().GetProperties().Select(p =&gt; p.Name).ToArray();
          foreach (var prop in names)
          {
              object propValue = o.GetType().GetProperty(prop).GetValue(o, null);
              var value = propValue.GetValue(o,null);
          }
  </code></pre>
  
  <p>But this is not working.</p>
  
  <p>I need to get the values for 'resource'.</p>
  
  <p>When I add watch, I see it nested as such:</p>
  
  <p><a href="https://i.stack.imgur.com/rk5uj.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rk5uj.gif" alt="enter image description here"></a></p>