title: Getting 'Cannot cast Newtonsoft.Json.Linq.JObject to Newtonsoft.Json.Linq.JToken' when retrieving items from JSON
body: <p>When having the following code </p>
  
  <pre><code>var TermSource =
  token.Value&lt;JArray&gt;("annotations")
       .Values&lt;string&gt;("Term Source")
       .FirstOrDefault();
  </code></pre>
  
  <p>I am able to get results for the following JSON block</p>
  
  <pre><code>"annotations": [
    {
       "Preferred Term": "Text1"
    },
    {
       "Term Source": "Text2"
    }
  ],
  </code></pre>
  
  <p>However, when running the following line </p>
  
  <pre><code>var country_code_iso3166_alpha2 =
      token.Value&lt;JArray&gt;("datatype_properties")
           .Values&lt;string&gt;("country_code_iso3166_alpha2")
           .FirstOrDefault();
  </code></pre>
  
  <p>for the following JSON block</p>
  
  <pre><code>"datatype_properties": {
    "country_name_iso3166_short": [
      "Text Text"
    ],
    "country_code_iso3166_alpha2": [
      "txt1"
    ],
    "country_code_iso3166_alpha3": [
      "txt2"
    ],
    "country_code_un_numeric3": [
      "10"
    ]
  </code></pre>
  
  <p>I get the following error</p>
  
  <p><em>'Cannot cast Newtonsoft.Json.Linq.JObject to Newtonsoft.Json.Linq.JToken'</em></p>
  
  <p>How I should fix the LINQ statement to retrieve the value for the 'country_code_iso3166_alpha2' data</p>