public function items($profileAlias = null)
    {
        $rawItems = empty($this->items) ? [] : $this->items;
        $items = new CollectionDocJsonItems($rawItems, $this);

        // optionally filter based on profile alias
        if ($profileAlias) {
            $filteredRawItems = [];
            foreach ($items as $idx => $item) {
                if ($item->getProfileAlias() == $profileAlias) {
                    $filteredRawItems[] = $rawItems[$idx];
                }
            }
            $items = new CollectionDocJsonItems($filteredRawItems, $this);
        }
        return $items;
    }