The substructure hierarchy in dark matter haloes