I'm new to php and am trying to parse a string I'm getting. The string is the result of a bash script I'm running, and I'm storing the output into a php variable. Here is the output I'm getting:
1/1 [==============================] - 1s 1s/step
[
{
"image_id": "mahomes1",
"mean_score_prediction": 6.3682564571499825
},
{
"image_id": "mahomes2",
"mean_score_prediction": 6.7501190304756165
},
{
"image_id": "mahomes3",
"mean_score_prediction": 6.3136263862252235
},
]
How would I go about parsing this string so that I can create a dictionary that stores the "image_id"
value with the "mean_score_prediction"
value?