title: How do I retrieve the value of php stdClass Object
body: <p>This is probably simple, but I am at my wits end.</p>
  
  <p>I am using an API.  I declare $checkLead and get a stdClassObject that will be displayed below.  I am trying to retrieve a value of the array. In this instance there is one record, but it may include more in the future.</p>
  
  <p>Here is what gets printed when I print_r.</p>
  
  <pre><code>stdClass Object ( 
      [result] =&gt; stdClass Object ( 
          [count] =&gt; 1 
          [leadRecordList] =&gt; stdClass Object ( 
              [leadRecord] =&gt; stdClass Object ( 
                  [Id] =&gt; 26 
                  [Email] =&gt; test3@test.com 
                  [ForeignSysPersonId] =&gt; 
                  [ForeignSysType] =&gt; 
                  [leadAttributeList] =&gt; stdClass Object ( 
                      [attribute] =&gt; Array ( 
                          [0] =&gt; stdClass Object ( 
                              [attrName] =&gt; FirstName 
                              [attrType] =&gt; string 
                              [attrValue] =&gt; JJ 
                          )
                          [1] =&gt; stdClass Object ( 
                              [attrName] =&gt; LastName 
                              [attrType] =&gt; string 
                              [attrValue] =&gt; JJ 
                          ) 
                          [2] =&gt; stdClass Object ( 
                              [attrName] =&gt; Website 
                              [attrType] =&gt; url 
                              [attrValue] =&gt; test.com 
                          )
                      )
                  )
              )
          )
      )
  )
  </code></pre>
  
  <p>Here is an example of a multiple result return.</p>
  
  <pre><code>stdClass Object (
  [result] =&gt; stdClass Object (
      [count] =&gt; 2
      [leadRecordList] =&gt; stdClass Object (
          [leadRecord] =&gt; Array (
              [0] =&gt; stdClass Object (
                  [Id] =&gt; 33
                  [Email] =&gt; test3@test.com
                  [ForeignSysPersonId] =&gt;
                  [ForeignSysType] =&gt;
                  [leadAttributeList] =&gt; stdClass Object (
                      [attribute] =&gt; Array (
                          [0] =&gt; stdClass Object (
                              [attrName] =&gt; FirstName
                              [attrType] =&gt; string
                              [attrValue] =&gt; jj )
                          [1] =&gt; stdClass Object (
                              [attrName] =&gt; LastName
                              [attrType] =&gt; string
                              [attrValue] =&gt; amonit )
                          [2] =&gt; stdClass Object (
                              [attrName] =&gt; Website
                              [attrType] =&gt; url
                              [attrValue] =&gt; test.com )
                          )
                      )
                  )
              [1] =&gt; stdClass Object (
                  [Id] =&gt; 26
                  [Email] =&gt; test3@test.com
                  [ForeignSysPersonId] =&gt;
                  [ForeignSysType] =&gt;
                  [leadAttributeList] =&gt; stdClass Object (
                      [attribute] =&gt; Array (
                          [0] =&gt; stdClass Object (
                              [attrName] =&gt; FirstName
                              [attrType] =&gt; string
                              [attrValue] =&gt; bob )
                          [1] =&gt; stdClass Object (
                              [attrName] =&gt; LastName
                              [attrType] =&gt; string
                              [attrValue] =&gt; smith )
                          [2] =&gt; stdClass Object (
                              [attrName] =&gt; Phone
                              [attrType] =&gt; phone
                              [attrValue] =&gt; 123-123-1234 )
                          [3] =&gt; stdClass Object (
                              [attrName] =&gt; Website
                              [attrType] =&gt; url
                              [attrValue] =&gt; test.com )
                          )
                      )
                  )
              )
          )
      )
  )
  </code></pre>
  
  <p>So, I was wondering if someone could help me retrieve the value for <code>FirstName</code>.  I would also like to be able to retrieve the value by saying something like "what is the value of <code>LastName</code> where the <code>FirstName</code> is equal to <code>"JJ"</code>.</p>