I have a json array look like this
{
"id":"1507593152797237",
"handle":"naveen",
"firstName":"bos",
"lastName":"Hello",
"email":"testnaveen.bos@gmail.com",
"pic":null,
"following":[
"123"
],
"followers":[
],
"groups":[
],
"blocking":[
],
"blockers":[
],
"postUnfollowing":[
],
"followingGroups":[
],
"likes":[
]
},
{
"id":"1234",
"handle":"naveesn.bos",
"firstName":"naveenbos",
"lastName":"boss",
"email":"naveen.boss@gmail.com",
"pic":null,
"following":[
"123"
],
"followers":[
],
"groups":[
11
],
"blocking":[
],
"blockers":[
],
"postUnfollowing":[
],
"followingGroups":[
],
"likes":[
],
}
I want to remove unwanted items from this array like followingGroups[],blockers[], blocking[],
$response =array();
foreach ($user["followers"] as $follower) { $response[] = $this->mongologue->user('find', $follower); } echo json_encode($response);
i need to unset unwanted things from $response, means remove thsese things followingGroups[],blockers[], blocking[], please help.