按值查找对象键
答
您想恢复键/值映射。
var test = {a: "b", c: "d"}
var reverted = {}
for(var key in test) {
reverted[test[key]] = key
}
为什么你想要这个? –