I have searched and read a lot of different forums to manage JSON data i have tried many things, but none of them works ;(
{"data": {"results": [{"qid_data": {"custom_id": "XXXXXX", "labels": "YYYYY", "meta": "{}", "bbox": [73, 57, 128, 516], "obj_id": "ZZZZZZ"}, "qid": "WWWWWWWW"}], "error": 0}}
I would like to get the values of:
custom_id
, labels
, bbox
, objet_id
, qid
Right now I have the following code (for example for custom_id
)
$json_output = json_decode($data);
foreach ($json_output as $json_result) {
echo "custom_id:".$json_result->data->results->qid_data->custom_id;
}
I have tried all the variations possible.
$json_result->results->qid_data->custom_id;
OR
$json_result->results->qid_data->custom_id;
OR
$json_result->data->results->custom_id;
OR
$json_result->results->custom_id;
I never get the result, always an error
If someone can help on how to export with an example for
data custom_id
, bbox
, qid