public function saveJSONArray($jsonValue, $jsonName = NULL)
    {
        $jsonArray = json_decode($jsonValue);

        if ((bool) $jsonName) { //If I want save all array in session I send the name of the array in session
            $this->setVar($jsonName, $jsonArray);
        } else {//I save each value in session
            foreach ($jsonArray as $varName => $value) {
                $this->setVar($varName, $value);
            }
        }
    }