document array versus object