题目描述有一个树形结构:vardata={key1:'str1',key2:{key3:'str3',key4:'str4',key5:{key6:'str6'},key8:{key9:'str9'}},key7:"str7"//...}实现一个方法getKeys(data,str),获取字符串str在data中所有的上级节点名称,例如:getKeys(data,'str1')返回'key1'getKeys(data,'str3')返回'key2key3'getKeys(data,'str6')返回'key2key5key6'
万千封印
HUH函数
相关分类