hash flatten the keys