You could build a new opbject and take either an object with a recursive call or a value and return the toggled value.
const
toggle = object => Object.fromEntries(Object
.entries(object)
.map(([k, v]) => [k, v && typeof v === 'object' ? toggle(v) : !v])
);
var object = { a: { b: { c: false } } };
console.log(toggle(object));