1

我在 php 脚本中解码了一个 json 数组(见下文)

我可以很容易地访问未包含在 items 数组中的那些值:

['订单']['shippingOption']['shippingRate']

['订单小计']

但无法弄清楚如何访问“items”数组中的 productSku、weight 等值。

任何帮助将非常感激。

谢谢

{

"order":{
"total":245.4,
"shippingOption":{
"shippingRate":5.4,
"shippingMethodId":"15367-1365940349119",
"estimatedTransitTime":"1",
"shippingMethodName":"Courier (Fastway)",
"type":""

},
"ticket":0,
"usdTotal":0,
"paymentParams":{
"map":{
}
},
"paymentStatus":"INCOMPLETE",
"volumeDiscount":0,
"subtotal":240,
"couponDiscount":0,
"tax":0,
"items":[
{
"relatedProducts":{
"productIds":"",
"relatedCategory":{
"enabled":false,
"categoryID":0,
"quantity":1
}
},
"weight":500,
"quantityInStock":0,
"tangible":true,
"ownerId":658087,
"wholesalePrices":{
},
"digital":false,
"id":0,
"fileKeys":[],
"shipping":5.4,
"imageId":94075362,
"productSku":"00247",
4

0 回答 0