I have data i want to get from array without loop.
I want to get "value" of "link_click" for example, how can i make this work?
I tried: but this not working.
$stats = json_decode($data, false);
$link_click= $stats->data->actions->action_type->['link_click']->value;
{
"data": [
{
"actions": [
{
"action_type": "comment",
"value": 2
},
{
"action_type": "link_click",
"value": 636
},
{
"action_type": "post_like",
"value": 2
},
{
"action_type": "page_engagement",
"value": 640
},
{
"action_type": "post_engagement",
"value": 640
}
],