title: How to add a json array into a property of a JObject with json.net
body: <p>I am having difficulty figuring out how to add an array of json objects to an existing <code>JObject</code>. Say I have a <code>JObject</code> with just the "Modified" property, and I want to add another property "IntersectGroups" that contains an array of json objects, how can I do this? I Have a <code>JObject[]</code> that when I serialize it is exactly in the format I require, but I am looking for something like this: <code>mainJObject.Add("IntersectGroups", myJObjectArray)</code></p>
  
  <p>Here is an example of the final json I want when I serialize it. </p>
  
  <pre><code>...
  "Modified": "2012-11-26T10:21:04.693",
  "IntersectGroups": [
    {
      "Id": 1004,
      "UserId": 20003,
      "GroupId": 1001,
      "Admin": false,
      "Expires": "1900-01-01T00:00:00"
    },
    {
      "Id": 1003,
      "UserId": 20003,
      "GroupId": 1000,
      "Admin": false,
      "Expires": "1900-01-01T00:00:00"
    }
  ]
  ...
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>My final solution was to use the JArray object. A JArray is a JContainer, which is a JToken, which you can add to a JObject. My problem was that I was trying to use a JObject[], which was not a valid JToken</p>