public function ArrayToObj($array, $root = False){
        $obj = !$root ? new jstoreRootObject($this) : new jstoreObject($this);
        foreach( $array as $arraykey => $arrayval){
            if( is_array($arrayval) ){
                $obj->$arraykey = $this->ArrayToObj($arrayval);
            }
            else{
                $obj->$arraykey = $arrayval;
            }
        }
        return $obj;
    }