Hidden order in bosonic gases confined in one-dimensional optical lattices