Update cleanObj.md

This commit is contained in:
David Wu
2017-12-26 14:18:13 +01:00
committed by GitHub
parent 52f7a7dee8
commit 3693c7e82c

View File

@ -13,8 +13,8 @@ const cleanObj = (obj, keysToKeep = [], childIndicator) => {
} else if (!keysToKeep.includes(key)) {
delete obj[key];
}
 })
return obj
 });
return obj;
}
/*
const testObj = {a: 1, b: 2, children: {a: 1, b: 2}}