I am looking to replace all fields with null values to prevent the model from proceeding further. However, when I attempt to create a replacer function and pass the model, I am encountering a circular reference issue. Is there a more effective way to accomplish this task without triggering the error?
const replacer = function (k, v) {
if (v === '') {
return undefined
}
return v
}
return JSON.parse(JSON.stringify(this.getData(), replacer))