title: Dynamically Deserialize JSON to C# Dictionary
body: <p>I have a JSON file I'm trying to deserialize to a list with a dictionary as the values, but struggling with getting the output in a nice format and struggling to index/parse it once it's deserialized.  I'm new to this and would appreciate the help.  I would like the key/value pairs to look like: {"greeting" : ["greet1": "hey", "greet2" : "hi"]}</p>
  
  <p>JSON file below:</p>
  
  <pre><code>{
  "greeting": [
          {
            "greet1": "hey",
            "greet2": "hi"
          }
        ],
  "bye": [
          {
            "bye1": "adios"
          }
        ]
  }
  </code></pre>
  
  <p>Attempted code:</p>
  
  <pre><code>public static Dictionary&lt;string, List&lt;Dictionary&lt;string, string&gt;&gt;&gt; jsonResponses = new Dictionary&lt;string, List&lt;Dictionary&lt;string, string&gt;&gt;&gt;();
  
  public static void DeserializeJsonDict()
  {
      string jsonURL = HttpContext.Current.Server.MapPath("./theFile.json");
  
      using (var webClient = new System.Net.WebClient())
      {
          var jsonData = webClient.DownloadString(jsonURL);
          jsonResponses = JsonConvert.DeserializeObject&lt;Dictionary&lt;string, List&lt;Dictionary&lt;string, string&gt;&gt;&gt;&gt;(jsonData);
  
      }
  
  }
  </code></pre>