function deepClone(obj){
let result = Array.isArray(obj) ? [] : {}
if(obj && typeof obj === "object") {
for(key in obj) {
if(obj.hasOwnProperty(key)) {
if(obj[key] && typeof obj[key] === "object") {
result[key] = deepClone(obj[key])
} else {
result[key] = obj[key]
}
}
}
}
return resul
}