How to implement ForEach statement on Newtonsoft JArray
<p>I need to cast JArray which I received from browser to list of MyType object. The problem is that I don't want to use .ToObject&lt;> extension because object sended from browser can have missing or extra values and I cannot change deserializer. I wrote my own parser to receive data from single JObject. Usage:</p>

<pre><code>foreach (var _object in _jarray)
{
    using (var tp = new TokenParser(_object)) 
    {
        MyType test = new MyType() 
        {
            id = tp.ConvertToInt("token_key")
        };
    }
}
</code></pre>

<p>What I want to do is something like this</p>

<pre><code>_jarray.ForEach(_object =&gt; {
    using (var tp = new TokenParser(_object)) 
    {
        MyType test = new MyType() 
        {
            id = tp.ConvertToInt("token_key")
        };
    }
});
</code></pre>

<p>I don't want to cast elements like: </p>

<pre><code>_jarray.Select(x =&gt; 
    (int)["token_key"]
);
</code></pre>

<p>I tried to wrote this extension based on <a href="https://stackoverflow.com/questions/200574/linq-equivalent-of-foreach-for-ienumerablet">LINQ equivalent of foreach for IEnumerable&lt;T&gt;</a> but it seems that <code>Action</code> requires <code>T</code> as parameter type. I don't need this because JArray is an array of JObject.</p>

<p>Is this possible to achieve?</p>