Have a form loaded with initial data and the submit button is disabled, make it enabled if anything updates in form
const initial = {name:"dharmveer",age: 27, adress: {city:"Jaipur",code:'123456',street:{st1:"test stq", st2:"test"}}};
const updated = {name:"Dharmveer",age: 27, adress: {city:"Jaipur",code:'123456',street:{st1:"test stq", st2:"test"}}};
const check = (initial, updated) => {
if(JSON.stringify(initial) === JSON.stringify(updated)){
console.log('disable');
} else{
console.log('enable');
}
}
check(initial,updated);