jsonjs.js
function clone(obj) {
  var cloned = {};
  for (var i in obj) {
    if (obj.hasOwnProperty(i)) {
      cloned[i] = obj[i];
    }
  }
  return cloned;
}
function clone(obj) {
  var cloned = {};
  for (var i in obj) {
    if (obj.hasOwnProperty(i)) {
      cloned[i] = obj[i];
    }
  }
  return cloned;
}
TODO:
- keep map of nested key paths to prevent looping all the time
- add more features from original jsonj
 
Clone an object
@param {object} obj
@returns {object}