title: Error Cannot access child value on Newtonsoft.Json.Linq.JProperty while reading JSON
body: <p>I am trying to read the properties from the rest response object. The response is an array of json objects as below. I want to read the properties lastName, titles.investigatorTitle.name, CurrentMembership.currentMembershipType.name</p>
  <pre><code>{
      &quot;data&quot;: [
          {
              &quot;investigatorID&quot;: 3,
              &quot;firstName&quot;: &quot;JH&quot;,
              &quot;middleName&quot;: &quot;JH&quot;,
              &quot;lastName&quot;: &quot;HV&quot;,
              &quot;titles&quot;: [
                  {
                      &quot;investigatorTitle&quot;: {
                          &quot;id&quot;: 7,
                          &quot;name&quot;: &quot;Professor&quot;,
                          &quot;active&quot;: true
                      },
                      &quot;additionalDetails&quot;: null,
                      &quot;startDate&quot;: null,
                      &quot;endDate&quot;: null,
                      &quot;displayIndex&quot;: 1
                  }
              ],
              &quot;CurrentMembership&quot;: [
                  {
                      &quot;investigatorCenterMembershipID&quot;: 4,
                      &quot;investigatorCenter&quot;: {
                          &quot;id&quot;: 1,
                          &quot;name&quot;: &quot;SCG&quot;
                      },
                      &quot;currentMembershipType&quot;: {
                          &quot;id&quot;: 11,
                          &quot;name&quot;: &quot;ABC Member&quot;,
                          &quot;code&quot;: &quot;ABC&quot;,
                          &quot;active&quot;: true
                      }
                  }
              ]
          },
          {
               &quot;investigatorID&quot;: 4,
              &quot;firstName&quot;: &quot;FG&quot;,
              &quot;middleName&quot;: &quot;JH&quot;,
              &quot;lastName&quot;: &quot;VF&quot;,
             &quot;titles&quot;: [
                  {
                      &quot;investigatorTitle&quot;: {
                          &quot;id&quot;: 7,
                          &quot;name&quot;: &quot;Professor&quot;,
                          &quot;active&quot;: true
                      },
                      &quot;additionalDetails&quot;: null,
                      &quot;startDate&quot;: null,
                      &quot;endDate&quot;: null,
                      &quot;displayIndex&quot;: 1
                  }
              ],
              &quot;CurrentMembership&quot;: [
                  {
                      &quot;investigatorCenterMembershipID&quot;: 4,
                      &quot;investigatorCenter&quot;: {
                          &quot;id&quot;: 1,
                          &quot;name&quot;: &quot;SCG&quot;
                      },
                      &quot;currentMembershipType&quot;: {
                          &quot;id&quot;: 11,
                          &quot;name&quot;: &quot;ABC Member&quot;,
                          &quot;code&quot;: &quot;ABC&quot;,
                          &quot;active&quot;: true
                      }
                  }
              ]
          }
      ],
      &quot;meta&quot;: {
          &quot;totalRecords&quot;: 675,
          &quot;totalPages&quot;: 27
      },
      &quot;links&quot;: null
  }
  </code></pre>
  <p>I am getting the error System.InvalidOperationException: 'Cannot access child value on Newtonsoft.Json.Linq.JProperty.' at c.Name = i[0].lastName;</p>
  <p>How can I access this correctly?</p>
  <pre><code>IRestResponse response = client.Execute(request);
  
              var InvestigatorList = new List&lt;searchResults&gt;();
  
              dynamic jsonResponse = JsonConvert.DeserializeObject(response.Content);
  
  
              foreach (dynamic i in jsonResponse)
              {
                  Contact c = new Contact();
                  
                  c.Name = i[0].lastName; //THE ERROR IS HAPPENING HERE
  
                  InvestigatorList.Add(new searchResults()
                  {
                      Name = c.Name,
                      Contact = c
                  });
                  
              }
  </code></pre>