将多个流式JSON对象合并为一个JSON对象 - 删除第一个返回的对象

时间:2015-06-03 14:30:58

标签: php json mailchimp

我已经看到了类似问题的答案 - 但它们并没有解决我遇到的问题。所以这里...... ..

我收到了来自MailChimp EXPORT API的回复,如下所示:

["Email Address","First Name","Last Name","Source","Open","MEMBER_RATING","OPTIN_TIME","OPTIN_IP","CONFIRM_TIME","CONFIRM_IP","LATITUDE","LONGITUDE","GMTOFF","DSTOFF","TIMEZONE","CC","REGION","LAST_CHANGED","LEID","EUID","NOTES"]
["email1@somewhere.com","","","BORN","",2,"",null,"2015-05-07 15:25:48",null,null,null,null,null,null,null,null,"2015-05-07 15:25:48","74554133","ar5jiewpkc",null]
["email2@somwhere.com","","","BORN","",2,"",null,"2015-05-07 15:25:48",null,null,null,null,null,null,null,null,"2015-05-07 15:25:48","74554137","ar5jiewpkc",null]

我需要做的是两件事:

  1. 删除第一个流对象(包含“电子邮件地址”等)
  2. 将其余对象合并为一个JSON响应,以传递给脚本,就好像它是一个常规的JSON响应一样。
  3. 这是一个JSON“Stream”,我需要将其变成常规的JSON响应。

    我已成功将它们全部转换为数组,但是当我尝试对数组数组进行json_encode时,我得到的转义数据不是真正的JSON对象。

    感谢任何帮助!

0 个答案:

没有答案