How to remove a value from a specific property in a JSON string by matching value?
<p>I have a JSON string like this:</p>

<pre><code>{"Country":"USA","States":["Chicago","Miami"]}

public string Remove(string json)
{
    string[] stateFilter = { "Chicago", "Miami"};
    foreach (var state in stateFilter)
    {
        //here I would like to create new copy of json for each state.
        string newJson = {"Country":"USA","States":["Chicago"]}  // Removed Miami from json for Chicago
    }
}
</code></pre>

<p>Now I would like to create a new JSON string for each state by finding the state in the JSON and removing it from the JSON string.  So each state will contain its new copy of the JSON and will not contain any other state.</p>

<p>For example: Chicago will contain <code>Chicago</code> in JSON <code>States</code> Property.</p>

<p>Code I am trying:</p>

<pre><code>public string Remove(string json)
{
    string[] stateFilter = { "Chicago", "Miami"};
    foreach (var state in stateFilter)
    {
        var jArr = JArray.Parse(json);

        jArr.Descendants().OfType&lt;JProperty&gt;()
            .Where(p =&gt; p.Name == state)
            .ToList()
            .ForEach(att =&gt; att.Remove());
    }
}
</code></pre>

<p>But the above code removes the property instead of the value from the JSON string.</p>