title: Json.NET Convert model to array and return to JObject
body: <p>I am having trouble finding the <code>JObject</code> nested keys in order to convert the key values to an array. The code below seems to only get the parent keys instead of the entire object.</p>
  
  <p>What I want: Convert any <code>ValuesToList</code> items in the <code>JObject</code> to <code>JArray</code> if they are not already an array irregardless of how nested the keys are. NOTE: Solution should work with entirely different Json models.</p>
  
  <p>Purpose: Sometimes the Json returns as a model instead of an array which causes deserializing to a model to throw exceptions.</p>
  
  <blockquote>
    <p>result = {{ "errors": null, "content": { "officeId": 1, "daysClosed": [] } }}</p>
  </blockquote>
  
  <pre><code>// values in ValuesToList are "content" and "daysClosed"
  var result = JObject.Parse(_responseString);
  
  foreach (string item in ValuesToList.ToArray())
  {
      // Check to see if toList value is contained in the JObject.
      if (result[item] != null)
      {
          // Check to see if the value is an array. If not, will convert to array/list Json.
          if (!(result[item] is JArray))
              result[item] = new JArray(result[item]);
      }
  }
  </code></pre>
  
  <p>The problem is that I am unable to find <code>daysClosed</code> in the <code>JObject</code> because it is a child. Thus, when <code>item = "daysClosed"</code> the <code>result[item]</code> will return <code>null</code>.</p>
  
  <p>I was working on a way to use reflection to solve this problem but ran into issues where a new <code>JObject</code> would be appended to the current <code>JObject</code> and I am looking to replace the Keys values with an array if the keyvalue exists and is not already an array.</p>