这可能很简单,但我无能为力。
我正在使用 API。我声明了 $checkLead 并获得了一个 stdClassObject ,它将显示在下面。我正在尝试检索数组的值。在这种情况下,只有一个记录,但将来可能会包含更多。
这是我 print_r 时打印的内容。
stdClass Object (
[result] => stdClass Object (
[count] => 1
[leadRecordList] => stdClass Object (
[leadRecord] => stdClass Object (
[Id] => 26
[Email] => test3@test.com
[ForeignSysPersonId] =>
[ForeignSysType] =>
[leadAttributeList] => stdClass Object (
[attribute] => Array (
[0] => stdClass Object (
[attrName] => FirstName
[attrType] => string
[attrValue] => JJ
)
[1] => stdClass Object (
[attrName] => LastName
[attrType] => string
[attrValue] => JJ
)
[2] => stdClass Object (
[attrName] => Website
[attrType] => url
[attrValue] => test.com
)
)
)
)
)
)
)
这是一个多结果返回的示例。
stdClass Object (
[result] => stdClass Object (
[count] => 2
[leadRecordList] => stdClass Object (
[leadRecord] => Array (
[0] => stdClass Object (
[Id] => 33
[Email] => test3@test.com
[ForeignSysPersonId] =>
[ForeignSysType] =>
[leadAttributeList] => stdClass Object (
[attribute] => Array (
[0] => stdClass Object (
[attrName] => FirstName
[attrType] => string
[attrValue] => jj )
[1] => stdClass Object (
[attrName] => LastName
[attrType] => string
[attrValue] => amonit )
[2] => stdClass Object (
[attrName] => Website
[attrType] => url
[attrValue] => test.com )
)
)
)
[1] => stdClass Object (
[Id] => 26
[Email] => test3@test.com
[ForeignSysPersonId] =>
[ForeignSysType] =>
[leadAttributeList] => stdClass Object (
[attribute] => Array (
[0] => stdClass Object (
[attrName] => FirstName
[attrType] => string
[attrValue] => bob )
[1] => stdClass Object (
[attrName] => LastName
[attrType] => string
[attrValue] => smith )
[2] => stdClass Object (
[attrName] => Phone
[attrType] => phone
[attrValue] => 123-123-1234 )
[3] => stdClass Object (
[attrName] => Website
[attrType] => url
[attrValue] => test.com )
)
)
)
)
)
)
)
所以,我想知道是否有人可以帮助我检索FirstName
. 我还希望能够通过说诸如“等于的值LastName
是什么”来检索该值。FirstName
"JJ"