Alibaba Group interview question

Design a setAll function for the hash