SWAP Kunci Nilai Objek JavaScript
function swap(json){
var ret = {};
for(var key in json){
ret[json[key]] = key;
}
return ret;
}
ZeldaIsANerd
function swap(json){
var ret = {};
for(var key in json){
ret[json[key]] = key;
}
return ret;
}