SOURCE

let aa = {
    a: 1,
    b: 2
}
console.log(Object.entries(aa))


let bb = Object.entries(aa).reduce((res, [key, name]) => {
    res[key] = Boolean(name)
    return res
}, {})

console.log(bb)


let cc = Object.values(aa).some(val => 1)
console.log(cc)
console 命令行工具 X clear

                    
>
console