public function only($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        $results = [];
        foreach ($keys as $key) {
            $results = array_merge_recursive($results, $this->buildArray(explode('.', $key), $this->get($key)));
        }

        return $results;
    }
public function only($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        $results = [];
        foreach ($keys as $key) {
            $results = array_merge_recursive($results, $this->buildArray(explode('.', $key), $this->get($key)));
        }

        return $results;
    }
public function only ( $ keys ) { $ keys = is_array ( $ keys ) ? $ keys : func_get_args ( ) ; $ results = [ ] ; foreach ( $ keys as $ key ) { $ results = array_merge_recursive ( $ results , $ this -> buildArray ( explode ( '.' , $ key ) , $ this -> get ( $ key ) ) ) ; } return $ results ; }
Get a subset of the items from the payload data.

@param  string|array $keys

@return array
Get a subset of the items from the payload data .