I call an API in response show an array in an object like this i share screen shot below
I want to remove the filter keyword in an activities object and rest of the response is same how i could do this. Please help Thanks in advance.
Here is my code below:
public function index(FilterRequest $request)
{
$data = $this->filter($request);
$mapsData = $data->original;
return response()->json(['activities'=> $mapsData], 200);
}

toArrayfunctions. laravel.com/docs/5.7/eloquent-resourcesunset()filters. If$mapsDatais anarray(), you can simple dounset($mapsData["filters"]). But it's recommended to do it earlier in the chain.