这是我的json回复:
{
"status": 1,
"message": "Fields list!",
"dataArray": {
"members": [
{
"id": "663657d6bee76fdd3285c879bf2849e2",
"email_address": "shahzad.hussain@vaivaltech.com"
}
]
}
}
在这里,我想获得id和email_address的密钥,但我也得到了id和email的值 这是我的控制器代码:
$mc = new MailChimp($apikey);
$fields = $mc->get('/lists/'.$list_id.'/members?fields=members.id,members.email_address');
$fields = ['status' => 1, 'message' => 'Fields list!', 'dataArray' => ($fields)
];
return Response::json($fields, 200);
如果在我的代码'dataArray'中输入php函数array_keys => ($字段) 当我点击我的请求时,它会在dataArray中显示空响应,如下所示:
{
"status": 1,
"message": "Fields list!",
"dataArray": [
"members"
]
}
我被困在这里为什么当我编写array_keys函数时它没有显示我的键,它返回nothng! 任何帮助将非常感谢!