obj-delete-key-value
const obj = {name: "xiaohesong", age: "18", password: "pwd"}
const withoutPwd = Object.key(obj).filter(key => key !== "password")
.map(key => {[key]: obj[key]})
.reduce((result, current) =>
({...result, ...current}),
{}
)const obj = {name: "xiaohesong", age: "18", password: "pwd"}
const withoutPwd = (({name, age}) => ({name, age}))(obj);Last updated