title: Using Linq to convert KeyValue pairs into Newtonsoft.Json.Linq.JObject
body: <p>I am trying to use C# LINQ to build a JObject.  I know that I can use a loop, such as,</p>
  
  <pre><code>var jobj = new JObject();
  foreach (var field in fieldList)
  {
      jobj[field.Name] = new JValue(field.Value);
  }
  </code></pre>
  
  <p>Is it possible to replace the loop with LINQ?  I tried this,</p>
  
  <pre><code>var data = fieldList.Select(field =&gt; new KeyValuePair&lt;string, JValue&gt;(field.Name, new JValue(field.Value)));
  var jobj = new JObject(data);
  </code></pre>
  
  <p>but it fails with this error:</p>
  
  <pre><code>Could not determine JSON object type for type System.Collections.Generic.KeyValuePair`2[
       System.String,Newtonsoft.Json.Linq.JValue].
  </code></pre>