Answers for "swap key value object javascript"

0

swap key value object javascript

function swap(json){
  var ret = {};
  for(var key in json){
    ret[json[key]] = key;
  }
  return ret;
}
Posted by: Guest on October-15-2020

Code answers related to "swap key value object javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language