public function walkCollection($collection, \Closure $callback)
    {
        if (is_array($collection)) {
            $result = [];

            foreach ($collection as $key => $item) {
                $result[$key] = $this->walkCollection($item, $callback);
            }

            return $callback($result);
        }

        return $collection;
    }