document got a main node, which can be array or object node