2017-01-21 6 views
0
stdClass Object ([PageNumber] => 0 [EntriesPerPage] => 0 [TotalEntries] => 643 [TotalPages] => 0 [Data] => Array ([0] => stdClass Object ([OrderId] => 521990a8-365d-43cd-aa6d-e4c54636c3e9 [NumOrderId] => 687215 [GeneralInfo] => stdClass Object ([Status] => 1 [LabelPrinted] => [LabelError] => [InvoicePrinted] => [PickListPrinted] => [Notes] => 0 [PartShipped] => [Marker] => 0 [ReferenceNum] => C Discount_1701210529XQFC0 [SecondaryReference] => C Discount_1701210529XQFC0 [ExternalReferenceNum] => C Discount_1701210529XQFC0 [ReceivedDate] => 2017-01-21T05:29:26.063 [Source] => CDISCOUNT [SubSource] => C Discount [HoldOrCancel] => [DespatchByDate] => 2017-02-01T06:08:32.603 [Location] => 00000000-0000-0000-0000-000000000000 [NumItems] => 1) [ShippingInfo] => stdClass Object ([Vendor] => DPD [PostalServiceId] => a48ee6be-d857-4c83-880c-47b725430c2c [PostalServiceName] => DPD Expresspak [TotalWeight] => 301 [ItemWeight] => 0 [PackageCategoryId] => 00000000-0000-0000-0000-000000000000 [PackageCategory] => Medium Product [PackageTypeId] => [PackageType] => [PostageCost] => 7.99 [PostageCostExTax] => 0 [TrackingNumber] => [ManualAdjust] =>) 

Я хочу получить значение «ReceivedDate». Pls Помощь, чтобы получить значение.Как получить объект stdClass в stdClass Значение объекта?

Благодаря

ответ

0

Попробуйте это ..

echo $object_name->data[0]->GeneralInfo->ReceivedDate;//$object_name is name of your object..which gives above result on var_dump() 
+0

Его работу, но нужно также [Детали] значение массива в CategoryName – princespn

+0

попробовать '$ object_name-> данные [0] -> ShippingInfo-> PackageCategory' ; для CategoryName. –

+0

"Данные": [ { "OrderId": "fd023def-e36f-4615-AAAC-71873262670c", "NumOrderId": 2, "GeneralInfo": { "Статус": 1, "LabelPrinted": правда, "LabelError": "образец строка 3", }, "ShippingInfo": { "PackageCategoryId": "254aebf0-22fa-433c-839d-3485b7ead5ea", "PackageCategory": "образец строка 7" , }, "элементы": [ { "CategoryName": "образец строка 9", «CompositeAvailablity»: 1, }] Нет, мне нужна категория предметов ... – princespn