Retrieve Data from a response object in PHP

22 Views Asked by At

New to php (used C and VB years ago) Using a Temboo API for Ebay, I'm attempting to retrieve messages from our eBay account. Although the API says it will return a JSON string, when executing it returns an object. Using var_dump(get_defined_vars($getMemberMessagesResults)); returns this relevant information:

'getMemberMessagesResults' => 
    object(eBay_Trading_GetMemberMessages_Results)[7]
      protected 'outputArray' => 
        array (size=1)
          'Response' => string '{"@xmlns":"urn:ebay:apis:eBLBaseComponents","Timestamp":"2021-07-29T21:52:49.047Z","Ack":"Warning","...
      protected 'lowercaseKeyMap' => 
        array (size=1)
          'response' => string 'Response' (length=8)

I am trying to extract the information 'Response'=> string('xlmns":"urn:ebay:apis"... information so that I can then process to put in a database. But, I cannot figure out how to reference this information to extract it. I've tried lots of references but so far I've been stumped. I realize the information is probably there somewhere but being new to PHP I'm feeling stumped. Thanks in advance for your assistance.

0

There are 0 best solutions below