白猪掌柜的
您的 JSON 实际上是 JSON 字符串中的 JSON 字符串。所以在 PHP 中试试这个$j = '{"neworder":"[{\"ItemName\":\"Sweet Pongal\",\"Cuisine\":\"Tiffen\",\"ItemId\":11,\"CuisineId\":1,\"itemType\":1,\"Quantity\":1,\"Restoid\":1,\"Mrp\":48,\"PackageCharges\":7,\"ItemCost\":48,\"distance\":1.3012003898620605,\"customerPhone\":\"9000539683\",\"customerName\":\"RAVI SHANKAR P\",\"Address\":\"45-2-40-11-5\\/1, Ramachandra Nagar, Akkayyapalem, Visakhapatnam, Andhra Pradesh 530016, India\",\"DeliveryOptions\":\"Right now\",\"amount\":188,\"paymentMode\":\"Cash\",\"latitude\":17.7359761,\"longitude\":83.2965298},{\"ItemName\":\"Idly\",\"Cuisine\":\"Tiffen\",\"ItemId\":1,\"CuisineId\":1,\"itemType\":1,\"Quantity\":2,\"Restoid\":1,\"Mrp\":34,\"PackageCharges\":7,\"ItemCost\":68,\"distance\":1.3012003898620605,\"customerPhone\":\"9000539683\",\"customerName\":\"RAVI SHANKAR P\",\"Address\":\"45-2-40-11-5\\/1, Ramachandra Nagar, Akkayyapalem, Visakhapatnam, Andhra Pradesh 530016, India\",\"DeliveryOptions\":\"Right now\",\"amount\":188,\"paymentMode\":\"Cash\",\"latitude\":17.7359761,\"longitude\":83.2965298}]"}';$obj = json_decode($j,1);print_r($obj);$neworder = json_decode($obj['neworder'],1);print_r($neworder);结果:Array( [neworder] => [{"ItemName":"Sweet Pongal","Cuisine":"Tiffen","ItemId":11,"CuisineId":1,"itemType":1,"Quantity":1,"Restoid":1,"Mrp":48,"PackageCharges":7,"ItemCost":48,"distance":1.3012003898620605,"customerPhone":"9000539683","customerName":"RAVI SHANKAR P","Address":"45-2-40-11-5/1, Ramachandra Nagar, Akkayyapalem, Visakhapatnam, Andhra Pradesh 530016, India","DeliveryOptions":"Right now","amount":188,"paymentMode":"Cash","latitude":17.7359761,"longitude":83.2965298},{"ItemName":"Idly","Cuisine":"Tiffen","ItemId":1,"CuisineId":1,"itemType":1,"Quantity":2,"Restoid":1,"Mrp":34,"PackageCharges":7,"ItemCost":68,"distance":1.3012003898620605,"customerPhone":"9000539683","customerName":"RAVI SHANKAR P","Address":"45-2-40-11-5/1, Ramachandra Nagar, Akkayyapalem, Visakhapatnam, Andhra Pradesh 530016, India","DeliveryOptions":"Right now","amount":188,"paymentMode":"Cash","latitude":17.7359761,"longitude":83.2965298}])Array( [0] => Array ( [ItemName] => Sweet Pongal [Cuisine] => Tiffen [ItemId] => 11 [CuisineId] => 1 [itemType] => 1 [Quantity] => 1 [Restoid] => 1 [Mrp] => 48 [PackageCharges] => 7 [ItemCost] => 48 [distance] => 1.3012003898621 [customerPhone] => 9000539683 [customerName] => RAVI SHANKAR P [Address] => 45-2-40-11-5/1, Ramachandra Nagar, Akkayyapalem, Visakhapatnam, Andhra Pradesh 530016, India [DeliveryOptions] => Right now [amount] => 188 [paymentMode] => Cash [latitude] => 17.7359761 [longitude] => 83.2965298 ) [1] => Array ( [ItemName] => Idly [Cuisine] => Tiffen [ItemId] => 1 [CuisineId] => 1 [itemType] => 1 [Quantity] => 2 [Restoid] => 1 [Mrp] => 34 [PackageCharges] => 7 [ItemCost] => 68 [distance] => 1.3012003898621 [customerPhone] => 9000539683 [customerName] => RAVI SHANKAR P [Address] => 45-2-40-11-5/1, Ramachandra Nagar, Akkayyapalem, Visakhapatnam, Andhra Pradesh 530016, India [DeliveryOptions] => Right now [amount] => 188 [paymentMode] => Cash [latitude] => 17.7359761 [longitude] => 83.2965298 ))