function deepCogy(obj){
if(typeof obj != 'object' || obj == null){
return obj;
}
let copy = {};
if(obj.constructor === Array){
copy = [];
}
for(let key in obj){
copy[key] = deepCogy(obj[key]);
}
return copy;
}