public function addItem($key, $item)
    {
        $dataset = $this->getDataset($key);

        // Get max value for the id
        $max = 0;
        foreach ($dataset as $val) {
            if ($max < $val["id"]) {
                $max = $val["id"];
            }
        }
        $item["id"] = $max + 1;
        $dataset[] = $item;
        $this->saveDataset($key, $dataset);
        return $item;
    }