title: C# json object with empty json array
body: <p>I have a returned json object that contains an empty json array</p>
  
  <pre><code>{[]}
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>How do I check this in an if statement?</p>
  
  <pre><code>        string arrayData = string.Empty;
  
          if (response.Contains("\"data\":"))
          {
              JToken root = JObject.Parse(response);
              JToken data = root["data"];
              if (data != null)
              {
                  arrayData = data.ToString();
              }
          }
          else
          {
              arrayData = response;
          }
  
          var responseDatas = JsonConvert.DeserializeObject&lt;dynamic&gt;(arrayData);
  </code></pre>
  
  <p>Here, responseDatas is now </p>
  
  <pre><code>{[]}
  </code></pre>