title: How to ignore empty array elements with NewtonSoft library
body: <p>I have the following code :</p>
  
  <pre><code>public City[] Cities { get; set; }
  </code></pre>
  
  <p>In City class, I have two properties</p>
  
  <pre><code>public string Name { get; set; }
  public string Code { get; set; }
  </code></pre>
  
  <p>When a request comes that has this <code>Cities</code> field empty I would like to hide this with Newtonsoft.</p>
  
  <pre><code>[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
  public City[] Cities { get; set; }
  </code></pre>
  
  <p>But this code I have tried does not work because <code>Cities</code> is not null, but empty and the request always has the two properties in this array.  </p>
  
  <p>How should I use Newtonsoft in this case? Is there any additional check for the objects here needed?</p>