title: Linq JObject query
body: <p>I have some problems with jobject and jarray linq query. I get this error:</p>
  
  <pre><code>Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type     'Newtonsoft.Json.Linq.JArray'.
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>string fetchResult = JsonConvert.SerializeObject(sidebar, Formatting.Indented);
  JObject rss = JObject.Parse(fetchResult);
  
  var jsonModel = from item in (JArray)rss["RegistrationCase"]
                          select new DataList
                          {
                              RegistrationTypeName = item["RegistrationTypeName"].Value&lt;string&gt;(), };
  </code></pre>
  
  <p>If i remove (Jarray) i get: Cannot access child value on Newtonsoft.Json.Linq.JProperty.</p>
  
  <p>Json, jobject: e.g: i want RegistrationTypeName, FirstName and the value of JournalNumber.</p>
  
  <pre><code>{
  "Status": null,
  "RegistrationCase": {
  "RegistrationTypeName": " ",
  "ExpireDate": null,
  "PersonId": 7,
  "Person": {
    "FirstName": " ",
    "GenderValue": 2,
    "Gender": 2,
  },
  "UserId": 7,
  "User": {
    "UserName": "NO-DOM\\wme",
    "LastName": null,
    "Id": 7,
  },
  "Transactions": [],
  "Comments": [],
  "CustomData": [
    {
      "Key": "JournalNumber",
      "Value": "0654-84148-00000-25",
      "Id": 3,
    },
    {
      "Key": "IsConsentGiven",
      "Value": "False",
      "Id": 4,
    },
    {
  ],
  "FileId": null,
  "File": null,
  "Id": 7,
   }
  }
  </code></pre>