Response {#695 ▼
+original: array:2 [▼
"success" => true
"data" => array:2 [▼
"d" => 5
"ss" => "3.0"
]
]
+exception: null
+headers: ResponseHeaderBag {#691 ▶}
#content: "{"success":true,"data":{"d":5,"ss":"3.0"}}"
#version: "1.0"
#statusCode: 200
#statusText: "OK"
#charset: null
}
如何访问ss
值echo $rating_data['data']['ss'];die;
它说不能使用Illuminate\Http\Response as array
类型的对象请建议
答案 0 :(得分:1)
您可以使用dd()以可读的格式打印结果:
dd(json_decode(json_encode($ResponseData), true));
并返回回复:
return response()->json($ResponseData);
希望这可以帮到你!