var obj = {
name: "obj",
fn: {
add: true,
edit: true
}
}
var page1 = {
name: "page1",
fn: {
edit: false
}
}
var config = Object.assign({}, obj, page1)
// {name: "page1", fn: {edit: false}}
how can I override only one value of edit?
achieves the final result
{name: "page1", fn: {add:true, edit: false}}